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

Re: What exactly does it mean to complete inside $'...' anyway?



Bart wrote:
> 
> % : $'<TAB>x
> 
> for any particular values of "x", which might be e.g. $'\07' or $'\M-x'.
> Same goes for

The intent of existing zsh functionality (aside from bugs) seems to be
that quoting is ignored for the purposes of matching. So if you have
$'\x41', it will look for a completion candidate (filename or whatever)
that matches uppercase A. The x character forming part of the suffix
rather than the prefix doesn't really make much difference other than
the expected position of completed characters. For $'...' style quotes
I'm not sure anything else would be especially useful: either filtering
matches that would need special quoting or completing sequences like
\M-x.

When inserting a completion match, zsh seems to use the quoting style
from the first character. The ideal would be to preserve existing
quoting as far as possible.

By default a \ is removed when completing directly after it which is
especially useless. (I've largely worked around this my binding \ to a
custom widget.)

Oliver



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