Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in completion with curly braces?



On Sat, Nov 21, 2020 at 9:29 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:

> Consequently, brace expansion is presumably attempted for the same
> reason it s attempted when the words don't contain braces.  E.g., after
> «compadd -Q bar baz» followed by «foo ba{<TAB>», it offers «r» and «z»
> as completions, which let you build up «{bar,baz}» and «{baz,bar}»
> respectively.  Similarly, given «stash@{<TAB>», it presumably takes the
> brace for the start of a brace expansion, and the analogous construct
> which that behaviour lets you build up is «stash@{\{0\},\{1\}}» or
> «stash@{\{1\},\{0\}}» — except that when you press <TAB> a second time,
> the newly-inserted brace is once again inserted unescaped, which
> presumably gets handled as the start of a nested brace expansion.

But zle knows { is part of the completions, that's the reason why it's
adding it after a <tab>... It's adding precisely the thing that was
just typed.

> You can probably just remove the -Q.

I can't.

-- 
Felipe Contreras




Messages sorted by: Reverse Date, Date, Thread, Author