compgen -W [wordlist] will do command subtitution and parameter expansion in wordlist

2022-03-03 Thread ladyrick
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-a6qmCk/bash-5.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security uname o

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

2022-03-03 Thread Koichi Murase
2022年3月3日(木) 22:05 ladyrick via Bug reports for the GNU Bourne Again SHell : > 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 thi

Fwd: compgen -W [wordlist] will do command subtitution and parameter expansion in wordlist

2022-03-03 Thread Koichi Murase
Basically, you can reply to the bug-bash list instead of directly replying to the individuals. 2022年3月3日(木) 23:32 ladyrick : > Thank you for you reply. > > But your example still doesn't work. > > compgen -W '$(fc -l -10)' > of course passed the literal '$(fc -l -10)' to compgen. But inside compge

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

2022-03-03 Thread Chet Ramey
On 3/3/22 7:32 AM, ladyrick via Bug reports for the GNU Bourne Again SHell wrote: Bash Version: 5.0 Patch Level: 17 Release Status: release Description: I was develop a bash-completion function which can auto-complete history command. But when I use $ compgen -W "$(fc