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

Re: env -u completion doesn't work when there is a command



On Jul 30,  8:00pm, Vincent Lefevre wrote:
}
}   env -u LIBR[TAB] gcc
} 
} where the cursor is after LIBR, the completion doesn't work.

This is a generalized problem with _arguments, in that there's no way
to specify that an option (-u in this case) has a mandatory argument
that must be in a separate word.

Consequently, when a "rest" specification ('*::arguments: _normal')
appears and there is any ambiguity, it takes precedence.  Probably
something could be done to _arguments to change this, but I don't
have my hip waders and piton hammer handy today.

There are work-arounds possible in the caller of _arguments, mostly by
examining $words[CURRENT-1] and modifying the _arguments specification.
Maybe someone can suggest the best attack?



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