bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compgen -W [wordlist] will do command subtitution and parameter expa


From: Koichi Murase
Subject: Re: compgen -W [wordlist] will do command subtitution and parameter expansion in wordlist
Date: Thu, 3 Mar 2022 23:15:26 +0900

2022年3月3日(木) 22:05 ladyrick via Bug reports for the GNU Bourne Again
SHell <bug-bash@gnu.org>:
>         After many debug, I found that compgen will do command subtitution
>         and parameter expansion in word list.

This is actually the documented behavior. For example, the
bash-completion project relies on this behavior. To obtain the result
you want, we need to write it in the following way (i.e. to pass the
literal '$(fc -l -10)' to the compgen builtin):

    compgen -W '$(fc -l -10)' -- "${COMP_WORDS[1]}"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]