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

_expand with dynamic named directories (and other issue)

~[foo]/<tab> with _expand in the completer style currently expands
~[foo] into whatever it expands into, and doesn't enter path
completion. It works correctly for ~/<tab> (eg, leaves the ~/ prefix
alone). Against my own better judgment I looked at _expand and found
out about keep-prefix. Setting that to 'true' indeed fixes the problem
I have, but it seems from the description that it should do what I
want when set to 'changed' as well. The code in the file doesn't make
it clear to me why the [foo] makes a difference.

The following is independent of _expand but ~[foo] tab discards the
brackets and just does named directory completion on foo, for example
expanding to ~foobar if that was a named directory. This may be
dependent on glob_complete to some degree, in that i don't get ~foobar
from ~[foo] without it set, but other weird things happen instead, for
example ~[cvids] turns into ~dl. If anything at this point, I would
either expect a / to be added or for it to expand into the full path
via _expand.

Mikael Magnusson

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