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

Re: completion for $x:



On Jan 23, 10:40pm, Dave Yost wrote:
}
} I couldn't remember what the modifiers were, so I hit the tab key after
}    Z% echo $x:

Hmm, curious.  When completing after "$x" (no colon), the internals have
identified "p" as the prefix and know that we're in parameter context,
before _main_complete is even invoked.  With the colon, however, the
context has reverted to "command", and we attempt to complete for the
arguments of "echo" instead.  This happens even if you have an opening
brace "${x:" with no matching close, in contrast to "${x" which goes
into brace_parameter context.

So it appears there's some relatively low-level parsing that needs to
be tweaked to recognize that ":" does not end a parameter expansion,
before we can even think about describing the modifiers.



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