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

Re: completion: _normal after argument



Peter Stephenson wrote:
> Supposedly you don't even need to do that, however:
>    *:::message:action

>           executed or evaluated.  With three colons before the mes‐
>           sage  they are modified to refer only to the normal argu‐
>           ments covered by this description.

The three colon form should be right in this case. Shouldn't even need a
state: '*:::command:_normal' should work.

> I have a feeling I've had trouble with that in the past though (and,
> obviously, no one in their senses would try to understand _arguments).

Most of the troubles come when you're trying to call _arguments again.
Message 32848 on zsh-workers is also related. It can be useful to use a
small function to print $CURRENT and $words on a different tty to
understand things, and remember that _arguments expects words to start
with a command name.

Oliver



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