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

Re: _arguments question

On Jul 13,  8:20am, Matt Armstrong wrote:
} Subject: Re: _arguments question
} > To say that with either of the options, the argument may not be
} > completed, you include either its number or a `:' in their exclusion
} > lists (the `:' means that no argument at all may be completed after
} > the option).
} Ahh, neat trick.  I would suggest adding this to the man page -- I
} could not find it.

In the entry for _arguments:

     Each of the six forms of SPEC (yes, there are six, keep track of
     the nestings) may be preceded by a list of option names and
     argument numbers with which the option or argument described is
     mutually exclusive.  This list is given in parentheses, as in
     `(-two -three 1)-one:...' or `(-foo):...'.  In the first example,
     the options `-two' and `-three' and the first argument will not be
     offered as possible completions if the option `-one' is on the
     line before the cursor, and in the second example the option
     `-foo' will not be offered if the argument described by the
     specification is on the line.

     The list may also contain a single star (*) as one of its elements
     to specify that the description for the rest arguments (i.e. a
     specification of the form `*:...') should not be used, a colon (:)
     to specify that the descriptions for all normal (non-option-)
     arguments should not be used and a hyphen (-) to specify that the
     descriptions for all options should not be used.  This paragraph
     desperately needs rewriting.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

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