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

Re: return code of _arguments

--- Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > 
> > On Mar 23, 11:33pm, Oliver Kiddle wrote:
> > } If my understanding is correct the test [[ $? = 300 ]] after
> _arguments
> > } is going to be equivalent to the test [[ -n $state ]]?

I gather that the reason I was wrong there is because $state may
contain something before the call to _arguments (an may not be a local)
and without ->state actions, it would be unchanged.

> Hm.  We could of course add an option to _arguments to make it return
> 300 when needed.  Non-_arguments-wrappers would call it without the
> option...

I think doing something like this would definitely be a good idea. I
think it is better if the functions for user commands (like _bzip2) are
kept simpler at the expense of things like _arguments and _x_arguments.
I suppose the latter will also need to take the new option and when
called without it will need to use compstate[nmatches].


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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