* Re: Obsolete example in doc for _arguments?
@ 1999-09-20 8:47 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-09-20 8:47 UTC (permalink / raw)
To: zsh-workers
Bart Schaefer wrote:
> Here's a snippet from the compsys doc for _aguments. The example doesn't
> match the description at all. Have I missed something?
I only remember that I wanted to think about changing it...
Bye
Sven
diff -u od/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- od/Zsh/compsys.yo Mon Sep 20 10:21:44 1999
+++ Doc/Zsh/compsys.yo Mon Sep 20 10:46:54 1999
@@ -897,9 +897,9 @@
command from the line with the `tt(-)tt(-help)' option matches the
var(pattern). For example:
-example(_arguments -- '*\*' '(yes no)' \
- '*=FILE*' '_files' \
- '*=DIR*' '_files -/')
+example(_arguments -- '*\*:toggle:(yes no)' \
+ '*=FILE*:file:_files' \
+ '*=DIR*:directory:_files -/')
Here, `tt(yes)' and `tt(no)' will be completed as the argument of
options whose description ends in a star, file names for options that
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Obsolete example in doc for _arguments?
@ 1999-09-19 5:17 Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-09-19 5:17 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-09-20 10:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-20 8:47 Obsolete example in doc for _arguments? Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
1999-09-19 5:17 Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).