Basically, you can reply to the bug-bash list instead of directly replying to the individuals.
2022年3月3日(木) 23:32 ladyrick <ladyr...@qq.com>: > 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 compgen, > it is again subtituted. prove: >  It depends on what would be the result that you expect. a) If you expect the words obtained from the expanded result of $(fc -l -10), the first picture you have attached in the previous reply [I attach it again for bug-bash list: 66de9...@7e85d46f.87d12062.jpg] is the expected one. In this case, we can just pass the literal $(fc -l -10) to compgen as I have replied. b) If you expect the lines obtained from the expanded result of $(fc -l -10), you need to set IFS=$'\n'. So, IFS=$'\n' compgen -W '$(fc -l -10)' > If i really need the literal '$(fc -l -1)', for example I want to get '$(fc' > when I type '$(f<tab>' > I need to do this: >  c) If you expect the literal $(fc -l -1), you need to quote the word as compgen -W '\$\(fc\ -l\ -1\)' or compgen -W \''$(fc -l -1)'\' or tmp='$(fc -l -1)' compgen -W '"$tmp"' What is the result you actually would like to achieve? -- Koichi