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

Re: Completion: make certain options' arguments complete according to arguments given to previous options



On Fri, May 25, 2018 at 12:46 PM, Doron Behar <doron.behar@xxxxxxxxx> wrote:
>
> Is there a way to know if a certain argument was given? I'm talking
> about the case where this argument doesn't accept an argument.

It'll still be in the $opt_args array, just with an empty value.  So
e.g. ${+opt_args[--option]} will be 1.



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