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

Obsolete example in doc for _arguments?



Here's a snippet from the compsys doc for _aguments.  The example doesn't
match the description at all.  Have I missed something?

     For options that get an argument after a `=', the function also
     tries to automatically find out what should be completed as the
     argument.  The possible completions for option-arguments can be
     described with the arguments after the `--' (which are not used as
     described above). Each argument contains one description of the
     form `PATTERN:MESSAGE:ACTION'. The MESSAGE and the ACTION have the
     same format as for the normal option descriptions described above.
     The ACTION will be executed to complete arguments of options whose
     description in the output of the command from the line with the
     `--help' option matches the PATTERN. For example:

          _arguments -- '*\*'     '(yes no)' \
                        '*=FILE*' '_files' \
                        '*=DIR*'  '_files -/'

     Here, `yes' and `no' will be completed as the argument of options
     whose description ends in a star, file names for options that
     contain the substring `=FILE' in the description, and paths for
     options whose description contains `=DIR'.

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



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