diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-05 13:38:45 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-05 13:38:45 +0000 |
commit | 9f9b6e165516c4ee59b1f5b609a6890ccc3d598f (patch) | |
tree | 86460ad1a9886e6030fc1b1d1aee57668f28aa01 /Completion/User/_lynx | |
parent | 04118530d4157d3494349e2628246b78465e08f8 (diff) | |
download | zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.gz zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.xz zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.zip |
completion function cleanup for `_arguments' with the `-C' option and using it's return value (11195)
Diffstat (limited to 'Completion/User/_lynx')
-rw-r--r-- | Completion/User/_lynx | 205 |
1 files changed, 104 insertions, 101 deletions
diff --git a/Completion/User/_lynx b/Completion/User/_lynx index 42c3498fc..2d5978d27 100644 --- a/Completion/User/_lynx +++ b/Completion/User/_lynx @@ -1,109 +1,112 @@ #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 curcontext="$curcontext" state line +typeset -A opt_args -_lynx_restrictions () { - compset -P '*,' - compadd -qS, \ +_arguments -C \ + '-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:->html' \ + '-image_links' \ + '-ismap' \ + '-index=:URL:->html' \ + '-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:->html' && return 0 + +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 "$@" + ;; +html) + _files -g '*.html' || _urls + ;; +esac |