Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _cvs, _lynx, _wget use _values
- X-seq: zsh-workers 7937
- From: Tanaka Akira <akr@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: _cvs, _lynx, _wget use _values
- Date: 19 Sep 1999 19:44:01 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I modified _cvs, _lynx and _wget to use _values.
Index: Completion/User/_cvs
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_cvs,v
retrieving revision 1.1.1.11
diff -u -F^( -r1.1.1.11 _cvs
--- _cvs 1999/09/17 00:59:45 1.1.1.11
+++ _cvs 1999/09/19 10:41:21
@@ -225,21 +225,18 @@
builtin functions _cvs_history_x >&- ||
_cvs_history_x () {
- compset -P '*'
-
- compadd "$@" -S '' -d '(
- F\ --\ release
- O\ --\ checkout
- E\ --\ export
- T\ --\ rtag
- C\ --\ merge\ collision-detected
- G\ --\ merge\ succeed
- U\ --\ working\ file\ was\ copied
- W\ --\ working\ file\ was\ deleted
- A\ --\ A\ file\ was\ added
- M\ --\ A\ file\ was\ modified
- R\ --\ A\ file\ was\ removed
- )' F O E T C G U W A M R
+ _values -s '' 'type' \
+ 'F[release]' \
+ 'O[checkout]' \
+ 'E[export]' \
+ 'T[rtag]' \
+ 'C[merge collision-detected]' \
+ 'G[merge succeed]' \
+ 'U[working file was copied]' \
+ 'W[working file was deleted]' \
+ 'A[A file was added]' \
+ 'M[A file was modified]' \
+ 'R[A file was removed]'
}
builtin functions _cvs_import >&- ||
Index: Completion/User/_lynx
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_lynx,v
retrieving revision 1.1.1.1
diff -u -F^( -r1.1.1.1 _lynx
--- _lynx 1999/09/02 18:26:12 1.1.1.1
+++ _lynx 1999/09/19 10:41:22
@@ -1,109 +1,109 @@
#compdef lynx
-_lynx () {
- _arguments \
- '-accept_all_cookies' \
- '-anonymous' \
- '-assume_charset=:MIMENAME:' \
- '-assume_local_charset=:MIMENAME:' \
- '-assume_unrec_charset=:MIMENAME:' \
- '-auth=:ID\:PW:' \
- '-base' \
- '-blink' \
- '-book' \
- '-buried_news' \
- '-cache=:NUMBER:' \
- '-case' \
- '-cfg=:FILENAME:_files' \
- '-child' \
- '-color' \
- '-cookies' \
- '-core' \
- '-crawl' \
- '-display=:DISPLAY:_x_display' \
- '-dump' \
- '-editor=:EDITOR:_files' \
- '-emacskeys' \
- '-enable_scrollback' \
- '-error_file=:FILENAME:_files' \
- '-fileversions' \
- '-force_html' \
- '-force_secure' \
- '-from' \
- '-ftp' \
- '-get_data' \
- '-head' \
- '-help' \
- '-historical' \
- '-homepage=:URL: _urls -f' \
- '-image_links' \
- '-ismap' \
- '-index=:URL: _urls -f' \
- '-link=:NUMBER:' \
- '-localhost' \
- '-locexec' \
- '-mime_header' \
- '-minimal' \
- '-newschunksize=:NUMBER:' \
- '-newsmaxchunk=:NUMBER:' \
- '-nobrowse' \
- '-nocc' \
- '-nocolor' \
- '-noexec' \
- '-nofilereferer' \
- '-nolist' \
- '-nolog' \
- '-nonrestarting_sigwinch' \
- '-nopause' \
- '-noprint' \
- '-noredir' \
- '-noreferer' \
- '-nosocks' \
- '-nostatus' \
- '-number_links' \
- '-partial' \
- '-pauth=:ID\:PW:' \
- '-popup' \
- '-post_data' \
- '-preparsed' \
- '-print' \
- '-pseudo_inlines' \
- '-raw' \
- '-realm' \
- '-reload' \
- '-restrictions=:options:_lynx_restrictions' \
- '-resubmit_posts' \
- '-rlogin' \
- '-selective' \
- '-show_cursor' \
- '-soft_dquotes' \
- '-source' \
- '-startfile_ok' \
- '-tagsoup' \
- '-telnet' \
- '-term=:TERM:' \
- '-tlog' \
- '-trace' \
- '-traversal' \
- '-underscore' \
- '-useragent=:NAME:' \
- '-use_mouse' \
- '-validate' \
- '-verbose' \
- '-version' \
- '-vikeys' \
- '-width=:NUMBER:' \
- ':url: _urls -f'
-}
+local state line
+typeset -A options
-_lynx_restrictions () {
- compset -P '*,'
- compadd -qS, \
+_arguments \
+ '-accept_all_cookies' \
+ '-anonymous' \
+ '-assume_charset=:MIMENAME:' \
+ '-assume_local_charset=:MIMENAME:' \
+ '-assume_unrec_charset=:MIMENAME:' \
+ '-auth=:ID\:PW:' \
+ '-base' \
+ '-blink' \
+ '-book' \
+ '-buried_news' \
+ '-cache=:NUMBER:' \
+ '-case' \
+ '-cfg=:FILENAME:_files' \
+ '-child' \
+ '-color' \
+ '-cookies' \
+ '-core' \
+ '-crawl' \
+ '-display=:DISPLAY:_x_display' \
+ '-dump' \
+ '-editor=:EDITOR:_files' \
+ '-emacskeys' \
+ '-enable_scrollback' \
+ '-error_file=:FILENAME:_files' \
+ '-fileversions' \
+ '-force_html' \
+ '-force_secure' \
+ '-from' \
+ '-ftp' \
+ '-get_data' \
+ '-head' \
+ '-help' \
+ '-historical' \
+ '-homepage=:URL: _urls -f' \
+ '-image_links' \
+ '-ismap' \
+ '-index=:URL: _urls -f' \
+ '-link=:NUMBER:' \
+ '-localhost' \
+ '-locexec' \
+ '-mime_header' \
+ '-minimal' \
+ '-newschunksize=:NUMBER:' \
+ '-newsmaxchunk=:NUMBER:' \
+ '-nobrowse' \
+ '-nocc' \
+ '-nocolor' \
+ '-noexec' \
+ '-nofilereferer' \
+ '-nolist' \
+ '-nolog' \
+ '-nonrestarting_sigwinch' \
+ '-nopause' \
+ '-noprint' \
+ '-noredir' \
+ '-noreferer' \
+ '-nosocks' \
+ '-nostatus' \
+ '-number_links' \
+ '-partial' \
+ '-pauth=:ID\:PW:' \
+ '-popup' \
+ '-post_data' \
+ '-preparsed' \
+ '-print' \
+ '-pseudo_inlines' \
+ '-raw' \
+ '-realm' \
+ '-reload' \
+ '-restrictions=:options:->restrictions' \
+ '-resubmit_posts' \
+ '-rlogin' \
+ '-selective' \
+ '-show_cursor' \
+ '-soft_dquotes' \
+ '-source' \
+ '-startfile_ok' \
+ '-tagsoup' \
+ '-telnet' \
+ '-term=:TERM:' \
+ '-tlog' \
+ '-trace' \
+ '-traversal' \
+ '-underscore' \
+ '-useragent=:NAME:' \
+ '-use_mouse' \
+ '-validate' \
+ '-verbose' \
+ '-version' \
+ '-vikeys' \
+ '-width=:NUMBER:' \
+ ':url: _urls -f'
+
+case "$state" in
+restrictions)
+ _values -s ',' 'restriction' \
all bookmark bookmark_exec change_exec_perms default dired_support \
disk_save dotfiles download editor exec exec_frozen externals file_url \
goto inside_ftp inside_news inside_rlogin inside_telnet jump mail \
multibook news_post options_save outside_ftp outside_news outside_rlogin \
outside_telnet print shell suspend telnet_port useragent
-}
-
-_lynx "$@"
+ ;;
+esac
Index: Completion/User/_wget
===================================================================
RCS file: /projects/zsh/zsh/Completion/User/_wget,v
retrieving revision 1.1.1.1
diff -u -F^( -r1.1.1.1 _wget
--- _wget 1999/09/17 01:03:41 1.1.1.1
+++ _wget 1999/09/19 10:41:22
@@ -78,16 +78,13 @@
case "$state" in
noflags)
- tmp1=(
- 'v:non verbose'
- 'h:no host lookup'
- 'H:no host directories'
- 'd:no directories'
- 'c:no clobber'
- 'r:don'\''t remove listing'
- 'p:no parent'
- )
- tmp2=(${PREFIX}${^tmp1%%:*})
- _describe -o option tmp1 tmp2
+ _values -s '' 'option' \
+ 'v[non verbose]' \
+ 'h[no host lookup]' \
+ 'H[no host directories]' \
+ 'd[no directories]' \
+ 'c[no clobber]' \
+ 'r[don'\''t remove listing]' \
+ 'p[no parent]'
;;
esac
--
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author