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

Re: widget special PREFIX variable and cursor position with complete_in_word

Yuri D'Elia wrote:
> also try with:
> $ touch 'file*' 'file *' 'file(' 'file\' 'file\\'
> for some fancy ways to break the completion in awesome ways (the last
> three fail for me with and without the quote).

That's puzzling because all your examples work for me, at least
according to my expectations. That is both completion in general and the
_show_ambiguity function I posted. The files are added as matches with
backslash quoting for special characters. It isn't ideal if you use ' or
" in the middle of the word rather than the beginning or for completion
immediately after \ in the default configuration.

> The problem is that you don't know exacly what the completer is going to
> display. This is why I check $curtag. I'm not sure there's a better way
> to handle the situation then this:

Again, I'm puzzled because the pattern I posted works for me in either
case without having to guess the separator based on $curtag. There are
other approaches but it seems like you've got it working in a way that
is at least fairly satisfactory anyway.


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