diff options
Diffstat (limited to 'Completion/Unix/Command')
28 files changed, 109 insertions, 3024 deletions
diff --git a/Completion/Unix/Command/_aap b/Completion/Unix/Command/_aap deleted file mode 100644 index 38e50f1fc..000000000 --- a/Completion/Unix/Command/_aap +++ /dev/null @@ -1,50 +0,0 @@ -#compdef aap - -# A-A-P recipe executive version 1.076; released 2005 May 30 12:47:03 GMT - -local curcontext="$curcontext" state line ret=1 -typeset -A opt_args - -_arguments -C -s -S \ - '(- *)'{-V,--version}'[print version information and exit]' \ - '(- *)'{-h,--help}'[print help information and exit]' \ - '(-s --silent -v --verbose)'{-v,--verbose}'[print more information]' \ - '(-v --verbose -s --silent)'{-s,--silent}'[print less information]' \ - '(-d --debug)'{-d,--debug=}'[debug the specified items]:flags:' \ - '--profile=[profile A-A-P execution and write results in specified file]:output file:_files' \ - '(-n --nobuild)'{-n,--nobuild}'[print the build commands but do not execute them]' \ - '--changed=[consider specified file changed]:changed file:_files' \ - '(-t --touch)'{-t,--touch}'[update target signatures, do not build]' \ - '(-F --force)'{-F,--force}'[force rebuilding]' \ - '(-C --contents)'{-C,--contents}'[only build when file contents changed]' \ - \*{-c,--command=}'[execute a command after reading the recipe]:aap command:' \ - '(-k --continue)'{-k,--continue}'[continue building after an error]' \ - '(-S --stop)'{-S,--stop}'[stop building at first error (default)]' \ - '(-N --nofetch-recipe -R --fetch-recipe)'{-R,--fetch-recipe}'[fetch recipe file and child recipes]' \ - '(-R --fetch-recipe -N --nofetch-recipe)'{-N,--nofetch-recipe}'[do not fetch recipes for "fetch" target]' \ - '(-a --nocache)'{-a,--nocache}"[always download files, don't use the cache]" \ - '(-l --local)'{-l,--local}'[do not recurse into subdirectories]' \ - '(-j --jobs)'{-j,--jobs=}'[maximum number of parallel jobs]:number of jobs:' \ - '(-f --recipe -u --search-up --up)'{-u,--search-up,--up}'[search directory tree upwards for main.aap recipe]' \ - \*{-I,--include=}'[directory to search for included recipes]:include directory:_files -/' \ - '(-u --search-up --up -f --recipe)'{-f,--recipe=}'[recipe file to be executed]:recipe file:_files -g \*.aap\(-.\)' \ - '--install=[install specified package]:package name:' \ - '--[end of options, targets and assignments follow]' \ - '*:aap target:->target' && ret=0 - -if [[ "$state" = target ]]; then - local targets recipe - if [[ -n $opt_args[(I)(-u|--search-up|--up)] ]]; then - recipe=( (../)#main.aap(N[-1]) ) - else - recipe=${(v)opt_args[(I)(-f|--recipe)]:-main.aap} - fi - if [[ -f $recipe ]]; then - targets=( ${${(f)"$(_call_program targets $words[1] -f $recipe comment 2>/dev/null)"}/(#b)target (*):[[:blank:]]##(*)/$match[1]:${match[2]:l}} comment ) - _describe -t targets 'aap target' targets && ret=0 - else - _message -e targets 'aap target' - fi -fi - -return ret diff --git a/Completion/Unix/Command/_age b/Completion/Unix/Command/_age new file mode 100644 index 000000000..487933d92 --- /dev/null +++ b/Completion/Unix/Command/_age @@ -0,0 +1,24 @@ +#compdef age age-keygen + +case $service in + age) + _arguments -S -A '-?*' \ + '(- :)'{-h,--help}'[display usage information]' \ + '!(-d --decrypt)'{-e,--encrypt} \ + '(-e --encrypt -d --decrypt -a --armor -p --passphrase -r --recipient -R --recipients-file)'{-d,--decrypt}'[decrypt the input to the output]' \ + '(-o --output)'{-o,--output=}'[write result to given file]:output file:_files' \ + '(-a --armor -d --decrypt)'{-a,--armor}'[encrypt to PEM encoded format]' \ + '(-p --passphrase -d --decrypt)'{-p,--passphrase}'[encrypt with passphrase]' \ + '(-d --decrypt)'\*{-r,--recipient=}'[encrypt to specified recipient]:recipient' \ + '(-d --decrypt)'\*{-R,--recipients-file=}'[encrypt to recipients listed in specified file]:recipients file:_files' \ + \*{-i,--identity=}'[use given identify file]:identity:_files' \ + ':input:_files' + ;; + age-keygen) + _arguments -S -A '-?*' \ + '-pq[generate post-quantum hybrid ML-KEM-768 + X25519 key pair]' \ + '(-o --output)'{-o,--output}'[write the result to the given file]:file:_files' \ + '-y[convert an identity file to a recipients file]' \ + ':input:_files' + ;; +esac diff --git a/Completion/Unix/Command/_attr b/Completion/Unix/Command/_attr index 58fd8837e..208c46db6 100644 --- a/Completion/Unix/Command/_attr +++ b/Completion/Unix/Command/_attr @@ -2,7 +2,7 @@ case $service in attr) - _arguments -s -S "$list[@]" \ + _arguments -s -S \ '(-l -r -s -V)-g[get extended attribute for file]:attribute name' \ '(-g -s -r -V)-l[list extended attributes associated with file]' \ '(-l -g -s -q -V)-r[remove given attribute from file]:attribute name' \ diff --git a/Completion/Unix/Command/_baz b/Completion/Unix/Command/_baz deleted file mode 100644 index 0acdc4639..000000000 --- a/Completion/Unix/Command/_baz +++ /dev/null @@ -1,585 +0,0 @@ -#compdef baz - -autoload -z is-at-least -local BAZ=$words[1] -local baz_version -local hide_short - -# ask the user which version of baz this is -if ! zstyle -s ":completion:${curcontext}:" baz-version baz_version; then - # ask baz instead - baz_version="${${$($BAZ --version)#baz Bazaar version }%% \(thelove@canonical.com*}" -fi - -# test whether to hide short options from completion -if zstyle -s ":completion:${curcontext}:" hide-shortopts hide_short; then - case $hide_short in - true|yes|on|1) hide_short='!' ;; - *) hide_short='' ;; - esac -fi - -# completion functions -(( $+functions[_baz_archives] )) || -_baz_archives () { _arch_archives baz "$@" } - -(( $+functions[_baz_categories] )) || -_baz_categories () { _arch_namespace baz 1 "$argv[@]" } - -(( $+functions[_baz_branches] )) || -_baz_branches () { _arch_namespace baz 2 "$argv[@]" } - -(( $+functions[_baz_versions] )) || -_baz_versions () { _arch_namespace baz 3 "$argv[@]" } - -(( $+functions[_baz_revisions] )) || -_baz_revisions () { _arch_namespace baz 4 "$argv[@]" } - -(( $+functions[_baz_local_revisions] )) || -_baz_local_revisions () { - local expl1 expl2 tree_version=`$BAZ tree-version` - _description -V applied-patches expl1 "patch from this version" - _description -V other-patches expl2 "patch from other versions" - compadd "$expl1[@]" `$BAZ logs` - compadd "$expl2[@]" `$BAZ logs --full $($BAZ log-versions | grep -v $tree_version)` - # This is incredibly slow. - # Should complete based on -A, -R, -d -} - -(( $+functions[_baz_config] )) || -_baz_config () { - local configdir root ret=1 n expl - - n=$opt_args[(i)(-d|--dir)] - [[ -n "$n" ]] && configdir=$opt_args[$n] - root="$(_call_program baz $BAZ tree-root ${configdir} 2>&1)" - if (( $? )); then - if [[ -d "configs" ]]; then - root=. - else - _message -e messages "Error: $root" - return $ret - fi - fi - - if [[ -d "$root/configs" ]]; then - configdir=("$root/configs") - _description files expl 'config file' - _files -W configdir "$expl[@]" && ret=0 - else - _message -e messages "No configs/ directory in tree whose root is $root" - fi - return $ret -} - -(( $+functions[_baz_limit] )) || -_baz_limit () { #presently only does push-mirror style limits - [[ $words[$CURRENT] == *@* ]] && return 1 - - local expl archive - archive=${words[(r)*@*]:-$($BAZ my-default-archive 2> /dev/null)} - if [ $archive ]; then - - if [[ $PREFIX != *--* ]]; then - _description -V categories expl "categories in $archive" - compadd -q -S -- "$expl[@]" `$BAZ category $archive` - else - _baz_namespace_branches 3 - fi - fi -} - -(( $+functions[_baz_tree_or_rev] )) || -_baz_tree_or_rev () { - _alternative 'trees:tree:_files -/' 'revisions:revision:_baz_revisions' -} - -(( $+functions[_baz_libraries] )) || -_baz_libraries () { - local libraries expl - libraries=($(_call_program baz $BAZ my-revision-library)) - _description -V libraries expl "revision library" - compadd "$expl[@]" -a libraries -} - -(( $+functions[_baz_my_revision_library] )) || -_baz_my_revision_library () { - if [[ -n $words[(r)-d] ]] || [[ -n $words[(r)--delete] ]]; then - _baz_libraries - else - _files -/ - fi -} - -(( $+functions[_baz_log_versions] )) || -_baz_log_versions () { - local logs expl - logs=($(_call_program baz $BAZ log-versions)) - _description -V versions expl "log version" - compadd "$expl[@]" -a logs -} - -# command argument definitions -# commands with different versions - -local cmd_register_archive cmd_archives cmd_ls_archives cmd_redo -local cmd_redo_changes cmd_what_changed cmd_categories -local cmd_branches cmd_versions cmd_cacherev cmd_logs cmd_log_versions -local cmd_log_ls cmd_update cmd_join_branch cmd_replay cmd_deltapatch -local cmd_delta_patch cmd_apply_delta cmd_sync_tree cmd_make_sync_tree -local cmd_delta cmd_revdelta cmd_library_categories cmd_library_branches -local cmd_library_versions cmd_library_revisions -local cmd_status cmd_diff - -cmd_log_ls=('*:version:_baz_log_versions') -cmd_log_versions=() -# the options should only complete items that are in the tree - -cmd_register_archive=('::archive:_baz_archives' ':location:_files -/') -cmd_archives=('::regex:') -cmd_redo=('::changeset:_files -/') -cmd_status=('::dir:_files -/') -cmd_diff=('::revision:_baz_revisions' - # ':separator:(--)' '*::limit:_files' - #don't understand the limit usage -) -cmd_categories=('::archive:_baz_archives') -cmd_branches=('::category:_baz_categories') -cmd_versions=('::branch:_baz_branches') -cmd_cacherev=('::revision:_baz_revisions') -#should only complete non-cached revisions - -cmd_logs=($cmd_log_ls) -cmd_update=('::revision:_baz_revisions') -cmd_join_branch=(':revision:_baz_revisions') -#should only complete continuation revisions - -cmd_replay=('*::revision:_baz_revisions') -cmd_deltapatch=(':FROM:_baz_tree_or_rev' ':TO:_baz_tree_or_rev') -cmd_sync_tree=(':revision:_baz_revisions') -cmd_delta=(':FROM:_baz_tree_or_rev' ':TO:_baz_tree_or_rev' '::DEST:_files -/') -cmd_library_categories=('::archive:_baz_archives --library') -cmd_library_branches=('::category:_baz_categories --library') -cmd_library_versions=('::branch:_baz_branches --library') -cmd_library_revisions=('::version:_baz_versions --library') - -cmd_ls_archives=($cmd_archives) -cmd_redo_changes=($cmd_redo) -cmd_what_changed=($cmd_changes) -cmd_delta_patch=($cmd_deltapatch) -cmd_apply_delta=($cmd_deltapatch) -cmd_make_sync_tree=($cmd_sync_tree) -cmd_revdelta=($cmd_delta) - -# commands the same in all versions - -local cmd_help -cmd_help=() - -local cmd_my_id -cmd_my_id=('::id-string:') - -local cmd_my_default_archive -cmd_my_default_archive=('::archive:_baz_archives') - -local cmd_whereis_archive -cmd_whereis_archive=(':archive:_baz_archives') - -local cmd_init_tree -cmd_init_tree=('::version:_baz_versions') - -local cmd_tree_id -cmd_tree_id=('::directory:_files -/') - -local cmd_tree_root -cmd_tree_root=('::directory:_files -/') - -local cmd_tree_version -cmd_tree_version=(':version:_baz_versions') - -local cmd_build_config cmd_buildcfg -cmd_build_config=(':config:_baz_config') -cmd_buildcfg=($cmd_build_config) - -local cmd_cat_config cmd_catcfg cmd_cfgcat -cmd_cat_config=(':config:_baz_config') -cmd_catcfg=($cmd_cat_config) -cmd_cfgcat=($cmd_cat_config) - -local cmd_undo cmd_undo_changes -cmd_undo=('::revision:_baz_revisions') -cmd_undo_changes=($cmd_undo) - -local cmd_file_diffs -cmd_file_diffs=(':file:_files' '::revision:_baz_revisions') - -local cmd_file_find -cmd_file_find=(':file:_files' '::revision:_baz_revisions') - -local cmd_inventory cmd_srcfind -cmd_inventory=('::separator:(--)' '*:directory:_files -/') -cmd_srcfind=($cmd_inventory) - -local cmd_lint -cmd_lint=('::directory:_files -/') - -local cmd_id cmd_invtag -cmd_id=('*:file:_files') -cmd_invtag=($cmd_id) - -local cmd_id_tagging_method cmd_tagging_method methods -cmd_id_tagging_method=('::tagging method:(($methods))') -methods=( - 'names:use naming conventions only' - 'implicit:use naming conventions but permit for inventory tags' - 'tagline:use naming conventions but permit for inventory tags' - 'explicit:require explicit designation of source' -) -cmd_tagging_method=($cmd_id_tagging_method) - -local cmd_add cmd_add_id cmd_add_tag -cmd_add=('*:file to add:_files') -cmd_add_id=($cmd_add) -cmd_add_tag=($cmd_add) - -local cmd_delete cmd_delete_id cmd_delete_tag -cmd_delete=('*:file to delete:_files') -cmd_delete_id=($cmd_delete) -cmd_delete_tag=($cmd_delete) - -local cmd_move cmd_move_id cmd_move_tag -cmd_move_id=(':old name:_files' ':new name:_files') -cmd_move_id=($cmd_move) -cmd_move_tag=($cmd_move) -#would be nice not to offer dirs for newname if oldname is a file, and -#vice versa - -local cmd_mv -cmd_mv=('*:file:_files') -# not really right, but close enough - -local cmd_default_id cmd_explicit_default cmd_default_tag -cmd_default_id=('::TAG-PREFIX:') -cmd_explicit_default=($cmd_default_id) -cmd_default_tag=($cmd_default_id) - -local cmd_tagging_defaults cmd_id_tagging_defaults -cmd_tagging_defaults=() -cmd_id_tagging_defaults=($cmd_tagging_defaults) - -local cmd_changeset cmd_mkpatch -cmd_changeset=( - ':ORIG:_files -/' - ':MOD:_files -/' - ':DEST:_files -/' - '*:file:_files' -) -cmd_mkpatch=("$cmd_changeset[@]") - -local cmd_dopatch cmd_do_changeset cmd_apply_changeset -cmd_dopatch=(':changeset:_files -/' ':target:_files -/') -cmd_do_changeset=($cmd_dopatch) -cmd_apply_changeset=($cmd_dopatch) - -local cmd_show_changeset -cmd_show_changeset=('::changeset:_files -/') - -local cmd_make_archive -cmd_make_archive=('::name:' ':location:_files -/') - -local cmd_archive_setup -cmd_archive_setup=('*:version:_baz_branches --trailing-dashes') - -local cmd_make_category -cmd_make_category=(':category:_baz_archives -S /') - -local cmd_make_branch -cmd_make_branch=(':branch:_baz_categories --trailing-dashes') - -local cmd_make_version -cmd_make_version=(':version:_baz_branches --trailing-dashes') - -local cmd_import cmd_imprev -cmd_import=('::version:_baz_versions') -cmd_imprev=($cmd_import) - -local cmd_commit cmd_cmtrev -cmd_commit=('*:file:_files') -cmd_cmtrev=($cmd_commit) - -local cmd_get cmd_getrev -cmd_get=(':revision:_baz_revisions' '::directory:_files -/') -cmd_getrev=($cmd_get) - -local cmd_get_patch cmd_get_changeset -cmd_get_patch=(':revision:_baz_revisions' '::dir:_files -/') -cmd_get_changeset=($cmd_get_patch) - -local cmd_lock_revision -cmd_lock_revision=(':revision:_baz_revisions') - -local cmd_push_mirror cmd_archive_mirror -cmd_push_mirror=( - '::FROM or MINE:_baz_archives' - '::TO:_baz_archives' - '::LIMIT:_baz_limit' -) -cmd_archive_mirror=($cmd_push_mirror) - -local cmd_revisions -cmd_revisions=('::version:_baz_versions') - -local cmd_ancestry -cmd_ancestry=('::revision:_baz_revisions') - -local cmd_ancestry_graph -cmd_ancestry_graph=('::revision:_baz_revisions') - -local cmd_cat_archive_log -cmd_cat_archive_log=(':revision:_baz_revisions') - -local cmd_cachedrevs -cmd_cachedrevs=(':version:_baz_versions') - -local cmd_uncacherev -cmd_uncacherev=(':revision:_baz_revisions' '::dir:_files -/') - -local cmd_archive_meta_info -cmd_archive_meta_info=(':item-name:((name\:foo mirror\:bar))') - -local cmd_archive_snapshot -cmd_archive_snapshot=(':dir:_files -/' '::limit:_baz_revisions') - -local cmd_archive_version -cmd_archive_version=() - -local cmd_archive_fixup -cmd_archive_fixup=() - -local cmd_make_log -cmd_make_log=('::version:_baz_versions') - -local cmd_add_log cmd_add_log_version -cmd_add_log=(':version:_baz_versions') -cmd_add_log_version=($cmd_add_log) - -local cmd_remove_log cmd_remove_log_version -cmd_remove_log=(':version:_baz_log_versions') -cmd_remove_log_version=($cmd_remove_log) - -local cmd_abrowse -cmd_abrowse=('::LIMIT:_baz_revisions') - -local cmd_cat_log -cmd_cat_log=(':revision-spec:_baz_local_revisions') - -local cmd_changelog -cmd_changelog=('::version:_baz_versions') - -local cmd_log_for_merge -cmd_log_for_merge=('::version:_baz_versions') - -local cmd_merges -cmd_merges=(':INTO:_baz_revisions' '::FROM:_baz_revisions') - -local cmd_new_merges -cmd_new_merges=('::version:_baz_versions') - -local cmd_branch -cmd_branch=(':SOURCE-REVISION:_baz_revisions' ':TAG-VERSION:_baz_versions') - -local cmd_merge -cmd_merge=(':FROM:_baz_revisions') - -local cmd_missing cmd_whats_missing -cmd_missing=('::revision:_baz_revisions') -cmd_whats_missing=($cmd_missing) - -local cmd_pristines cmd_ls_pristines -cmd_pristines=('::limit:_baz_revisions') -cmd_ls_pristines=($cmd_pristines) - -local cmd_lock_pristine -cmd_lock_pristine=(':revision:_baz_revisions') - -local cmd_add_pristine -cmd_add_pristine=(':revision:_baz_revisions') - -local cmd_find_pristine -cmd_find_pristine=(':revision:_baz_revisions') - -local cmd_my_revision_library -cmd_my_revision_library=(':library:_baz_my_revision_library') - -local cmd_library_find -cmd_library_find=(':revision:_baz_revisions --library') - -local cmd_library_add -cmd_library_add=(':revision:_baz_revisions --exclude-library-revisions') - -local cmd_library_remove -cmd_library_remove=(':revision:_baz_revisions --library') - -local cmd_library_archives -cmd_library_archives=() - -local cmd_library_log -cmd_library_log=(':revision:_baz_revisions --library') - -local cmd_library_file -cmd_library_file=(':file:_files' ':revision:_baz_revisions --library') - -local cmd_grab -cmd_grab=(':location:_files') - -local cmd_parse_package_name -cmd_parse_package_name=(':name:') - -local cmd_valid_package_name -cmd_valid_package_name=(':name:') - -local cmd_library_config -cmd_library_config=(':library:_baz_libraries') - -local cmd_rbrowse -cmd_rbrowse=('::regular expression:') - -local cmd_rm -cmd_rm=('*:file:_files') - -local cmd_escape -cmd_escape=(':string:') - -local cmd_switch -cmd_switch=(':revision:_baz_revisions') - -#mutually exclusive options - -local -A excludes -excludes=( -# This first line means that if --output was given, don't complete -# --no-output or --keep. The converse is not true. ---output '--no-output --keep' ---no-output --output - ---silent ' --quiet --report --verbose --debug' ---quiet '--silent --report --verbose --debug' ---report '--silent --quiet --verbose --debug' ---verbose '--silent --quiet --report --debug' ---debug '--silent --quiet --report --verbose ' - ---sparse --non-sparse ---non-sparse --sparse - ---files ' --directories --both' ---directories '--files --both' ---both '--files --directories ' - ---mirror --mirror-from ---mirror-from --mirror - ---no-cached --cached-tags ---cached-tags --no-cached - ---non-greedy --greedy ---greedy --non-greedy -) - -_baz_main () { - typeset -A opt_args - local arguments - if (( CURRENT > 2 )); then - local cmd=${words[2]} - local var_cmd=cmd_${cmd//-/_} - curcontext="${curcontext%:*:*}:baz-$cmd:" - (( CURRENT-- )) - shift words - - arguments=() - local input - input=(${${(M)${(f)"$($BAZ $cmd -h)"}:# *}# }) - - local i j=1 - local short long arg desc action - short=() - long=() - arg=() - desc=() - action=() - for (( i=1 ; i <= ${#input} ; i++ )); do - [[ "$input[i]" != *[^\ ]* ]] && continue # stupid blank lines - short[j]="${${${input[i]}[1,2]}#--}" - long[j]="${${input[i]#-?, }%% *}" - - arg[j]="${${${input[i]%% *}##* }##-*}" - [[ $long[j] == --archive ]] && arg[j]=ARCHIVE # baz doesn't mention this - - desc[j]="${input[i]##* }" - if [[ "$input[i+1]" == \ *[^\ ]* ]]; then # description continues - (( i++ )) - desc[j]="$desc[j] ${input[i]##* }" - fi - [[ "$short[j]" == -[hHV] ]] && continue - desc[j]="${${desc[j]//\[/\\[}//\]/\\]}" # escape brackets - - case $arg[j] in - DIR|PATCH-DIR|DEST|OUTPUT|PATH) - action[j]='_files -/' ;; - FILES|FILE|SNAP-FILE) - action[j]='_files' ;; - MASTER|MASTER-SOURCE|ARCHIVE) - action[j]='_baz_archives' ;; - CATEGORY) - action[j]='_baz_categories' ;; - BRANCH) - action[j]='_baz_branches' ;; - VERSION) - action[j]='_baz_versions' ;; - CFG) - action[j]='_baz_configs' ;; - LIB) - action[j]='_baz_libraries' ;; -# PATCH,FILE) # not sure how to complete this -# action[j]='_baz_patch_file' ;; - *) - action[j]='' ;; - esac - - (( j++ )) - - done - - local excluded k - for (( i = 1 ; i < j ; i++ )); do - excluded=($short[i] $long[i]) - foreach opt (${=excludes[$long[i]]}) - k=$long[(i)$opt] - excluded=($excluded $short[k] $long[k]) - #excludes matching short options too :-) - end - - - # generate arguments to _arguments ;-) - # make long and short options mutually exclusive - [ $short[i] ] && arguments=("$arguments[@]" - "${hide_short}(${excluded})${short[i]}[${desc[i]}]${arg[i]:+:$arg[i]:$action[i]}") - [ $long[i] ] && arguments=("$arguments[@]" - "(${excluded})${long[i]}[${desc[i]}]${arg[i]:+:$arg[i]:$action[i]}") - done - - arguments=("$arguments[@]" "${(@P)var_cmd-*:FILE:_files}") - else - local help - local -U cmds - help=(${(f)"$($BAZ help)"}) - cmds=(${${${${(M)help:#* :*}/ #: #/:}%% ##}## #}) - arguments=(':command:(($cmds))') - fi - _arguments -S -A '-*' \ - {"${hide_short}(: -)-V",'(: -)--version'}'[display version]' \ - {"${hide_short}(: -)-h",'(: -)--help'}'[display help]' \ - '(: -)-H[display verbose help]' \ - "$arguments[@]" -} - -_baz_main "$@" diff --git a/Completion/Unix/Command/_bittorrent b/Completion/Unix/Command/_bittorrent deleted file mode 100644 index 1fbab35ef..000000000 --- a/Completion/Unix/Command/_bittorrent +++ /dev/null @@ -1,100 +0,0 @@ -#compdef btdownloadcurses btdownloadheadless btdownloadgui btlaunchmany btlaunchmanycurses bttrack btshowmetainfo btreannounce btmakemetafile btrename - -# Bittorrent completion commands. Originally written by Jussi -# Pakkanen, 2004. Most of the command descriptions are from the Debian -# project's man pages. - -# Modified by R.Ramkumar, 2006 to conform to zsh completion standards and -# enhance completion for certain options. - -case $service in - -# Start with the clients. - - btdownloadcurses) - ;& - btdownloadheadless) - ;& - btdownloadgui) - ;& - btlaunchmany) - ;& - btlaunchmanycurses) - _arguments -s -S \ - '(--responsefile)--responsefile+[specify file for server response]:file:_files'\ - "--url+[specify URL of torrent file]:URL:_urls"\ - '(-i --ip)'{-i+,--ip+}'[specify ip address to report as]:ip address'\ - "--bind+[specify ip to bind to instead of default]:ip:_bind_addresses"\ - "--minport+[specify minimum port to listen to]:port:"\ - "--maxport+[specify maximum port to listen to]:port:"\ - "--saveas+[specify file to save to]:file:_files -/"\ - "--max_uploads+[specify maximum amount of uploads]:uploads:"\ - "--max_upload_rate+[specify maximum upload rate]:rate (kb):"\ - "--keepalive_interval+[specify pause between keepalives]:time (s):"\ - "--download_slice_size+[specify bytes to query per request]:size (b):"\ - "--request_backlog+[specify number of requests to keep in a single pipe]:requests:"\ - "--max_message_length+[specify maximum length of prefix encoding]:size (b):"\ - "--timeout+[specify timeout before closing sockets on receiving nothing]:timeout (s):"\ - "--timeout_check_interval+[specify interval to check for connection time]:time interval (s):"\ - "--max_slice_length+[specify maximum size of requests accepted from peers]:size (b):"\ - "--max_rate_recalculate_interval+[specify length of pauses leading to reduced rate]:time (s):"\ - "--max_rate_period+[specify maximum time taken to guess the current rate estimate]:time (s):"\ - "--upload_rate_fudge+[specify time equivalent of writing to kernel TCP buffer]:time (s):"\ - "--display_interval+[specify time between updates to displayed information]:time (s):"\ - "--rerequest_interval+[specify time between requests for more peers]:time (s)"\ - "--min_peers+[specify peers needed before stopping or delaying requests for peers]:peers:"\ - "--http_timeout+[specify timeout for http connections]:timeout (s):"\ - "--snub_time+[specify timeout to decide that connection is semi-permanently choked]:timeout (s):"\ - "--spew+[display diagnostic info to stdout]:enable:(0 1)"\ - "--check_hashes+[check hashes on disk]:enable:(0 1)"\ - "--max_initiate+[specify peers needed before stopping initiating new connections]:peers:"\ - "--report_hash_failures+[report hash failures to user]:enable:(0 1)"\ - "--rarest_first_priority_cutoff+[specify peers which need to have a piece before other partials take priority over rarest first]:peers:"\ - ':torrent file:_files -g "*.torrent(-.)"' - return - ;; - -# Next up are the torrent file manipulation programs. - - btshowmetainfo) - _files -g "*.torrent(-.)" && return - ;; - - btrename) - _files -g '*.torrent(-.)' && return - ;; - - btmakemetafile) - _arguments -s -S \ - '--piece_size_pow2+[specify power of 2 to set the piece size to]:power:' \ - "--comment+[specify human-readable comment to put in .torrent]:comment:"\ - "--target+[specify target file for the torrent]:file:_files"\ - ':file:_files' - return - ;; - - btreannounce) - _files -g '*.torrent(-.)' && return - ;; - -# Lastly the tracker. - - bttrack) - _arguments -s -S \ - "--port+[specify port to listen on]:port number:" \ - "--dfile+[specify file to store recent downloader info]:file:_files" \ - "--bind+[specify ip to bind to]:bind address:_bind_addresses" \ - "--socket_timeout+[specify timeout for closing connections]:timeout (s):"\ - "--save_dfile_interval+[specify interval between saving dfile]:time (s):"\ - "--timeout_downloaders_interval+[timeout for expiring downloaders]:time (s):" \ - "--reannounce_interval+[specify interval downloaders should wait between reannouncements]:time (s):" \ - "--response_size+[specify peers to send in an info message]:peers:" \ - "--timeout_check_interval+[specify connection timeout]:timeout (s):"\ - "--nat_check=[check back and ban downloaders behind NAT]:enable:(0 1)" \ - "--min_time_between_log_flushes+[specify minimum time between log flushes]:time (s):" \ - "--allowed_dir+[specify directory having downloadable torrents]:directory:_files -/" \ - "--parse_allowed_interval+[specify interval between reloading allowed_dir]:time (min):" \ - "--show_names+[display names from allowed dir]:enable:(0 1)" - return - ;; -esac diff --git a/Completion/Unix/Command/_clay b/Completion/Unix/Command/_clay deleted file mode 100644 index 581338b8b..000000000 --- a/Completion/Unix/Command/_clay +++ /dev/null @@ -1,42 +0,0 @@ -#compdef clay - -# Completion for the Clay Programming Language -# http://claylabs.com/clay/ - -_arguments -C \ - "-o:specify output file:_files" \ - "-target:set target platform for code generation" \ - "-shared[create a dynamically linkable library]" \ - "-emit-llvm[emit llvm code]" \ - "-S[emit assembler code]" \ - "-c[emit object code]" \ - "-D-:set flag value" \ - "-O-:set optimization level:(0 1 2 3)" \ - "-g[keep debug symbol information]" \ - "-exceptions[enable exception handling]" \ - "-no-exceptions[disable exception handling]" \ - "-inline[inline procedures marked 'forceinline']" \ - "-no-inline[ignore 'inline' and 'forceinline' keyword]" \ - "-import-externals[include externals from imported modules]" \ - "-no-import-externals[don't include externals from imported modules]" \ - "-pic[generate position independent code]" \ - "-abort[abort on error (to get stacktrace in gdb)]" \ - "-run[execute the program without writing to disk]" \ - "-timing[show timing information]" \ - "-full-match-errors[show universal patterns in match failure errors]" \ - "-log-match:log overload matching behavior for calls" \ - "-arch:build for Darwin architecture <arch>" \ - "-F-:add <dir> to framework search path:_files -/" \ - "-framework:link with framework <name>" \ - "-L:add <dir> to library search path:_files -/" \ - "-Wl,-:pass flags to linker" \ - "-l-:link with library <lib>" \ - "-I+:add <path> to clay module search path:_files -/" \ - "-deps[keep track of the dependencies of the currently]" \ - "-no-deps[don't generate dependencies file]" \ - "-o-deps:write the dependencies to this file" \ - "-e:compile and run <source> (implies -run)" \ - "-M-:import <module>.*; for -e" \ - "-v[display version info]" \ - ":program file:_files -g '*.clay(-.)'" - diff --git a/Completion/Unix/Command/_cplay b/Completion/Unix/Command/_cplay deleted file mode 100644 index f1755c1a1..000000000 --- a/Completion/Unix/Command/_cplay +++ /dev/null @@ -1,8 +0,0 @@ -#compdef cplay - -_arguments -s \ - '-n[enable restricted mode]' \ - '-r[toggle playlist repeat mode]' \ - '-R[toggle playlist random mode]' \ - '-v[toggle PCM and MASTER volume control]' \ - '*:playlist or directory or audio file:_files -g "*.(mp3|mp2|ogg|669|amf|ams|dsm|far|it|med|mod|mt2|mtm|okt|s3m|stm|ult|gdm|xm|m3u|pls|spx|wav|au)(-.)"' diff --git a/Completion/Unix/Command/_fsh b/Completion/Unix/Command/_fsh deleted file mode 100644 index c39373117..000000000 --- a/Completion/Unix/Command/_fsh +++ /dev/null @@ -1,22 +0,0 @@ -#compdef fsh - -local curcontext="$curcontext" state line ret=1 -local -a _comp_priv_prefix - -_arguments -C \ - '(- : *)'{-h,--help}'[display help information]' \ - '(- : *)'{-V,--version}'[display version information]' \ - '-r[specify method]:method:(rsh ssh)' \ - '-l[specify login id]:login:_users' \ - '(-T --timeout)'{-T,--timeout}':idle timeout:' \ - ':remote host name:_hosts' \ - '(-):command: _command_names -e' \ - '*::args:->command' && ret=0 - -if [[ -n "$state" ]]; then - shift 1 words - (( CURRENT-- )) - _normal && ret=0 -fi - -return ret diff --git a/Completion/Unix/Command/_grep b/Completion/Unix/Command/_grep index 0f1e712fd..120d1feea 100644 --- a/Completion/Unix/Command/_grep +++ b/Completion/Unix/Command/_grep @@ -68,7 +68,9 @@ arguments+=( '(-)--help[display help information]' ) -_pick_variant -r variant -c "$command" gnu=gnu gpl2=2.5.1 unix --version +_pick_variant -r variant -c "$command" \ + gnu=gnu gpl2='(2.5.1|GNU compatible)' unix --version + case $variant:$OSTYPE in (gnu:*|gpl2:freebsd*)) [[ $service != (|g|z|gz|bz)[ef]grep ]] && arguments+=( diff --git a/Completion/Unix/Command/_htop b/Completion/Unix/Command/_htop new file mode 100644 index 000000000..73a6ea9fa --- /dev/null +++ b/Completion/Unix/Command/_htop @@ -0,0 +1,57 @@ +#compdef htop pcp-htop + +# Notes: +# - htop allows long options to be passed with a single dash; we don't account +# for this +# - htop parses optional arguments to -H and -u 'cleverly' by allowing the next +# word to be the optarg if it doesn't begin with a '-'; this should work here +# - There is a special version of htop designed to be used with PCP (Performance +# CoPilot); we don't fully account for this +# - Some of the ranges and defaults listed here had to be found in the source + +local MATCH MBEGIN MEND ret=1 +local -a context line state state_descr args tmp + +args=( + '(-d --delay)'{-d+,--delay=}'[specify update frequency]:delay (tenths of seconds) (1-100) [15]' + '(-C --no-color --no-colour)'{-C,--no-colo{,u}r}'[use monochrome colour scheme]' + '(-F --filter)'{-F+,--filter=}'[show only commands matching specified filter]:case-insensitive command-line sub-string:_process_names -a' + '(-)'{-h,--help}'[display usage information]' + '(-H --highlight-changes)'{-H+,--highlight-changes=}'[highlight new and old processes (optionally specify delay)]::delay (seconds) (1-86400) [5]' + '(-M --no-mouse)'{-M,--no-mouse}'[disable mouse]' + '--no-meters[hide meters]' + '(-n --max-iterations)'{-n+,--max-iterations=}'[exit after given number of frame updates]:number' + \*{-p+,--pid=}'[show only specified PIDs]: : _sequence _pids' + '--readonly[disable all system and process changing features]' + '(-s --sort-key)'{-s+,--sort-key=}'[sort by specified column]: :->sort-keys' + '(-t --tree)'{-t,--tree}'[show tree view of processes]' + '(-u --user)'{-u+,--user=}'[show only processes of current or specified user]:: : _users' + '(-U --no-unicode)'{-U,--no-unicode}'[disable Unicode]' + '(-)'{-V,--version}'[display version information]' +) + +[[ $OSTYPE == linux* ]] && +(( ! EUID || $+_comp_priv_prefix )) && +_pick_variant libcap=drop-capabilities $OSTYPE --help && +args+=( + '--drop-capabilities=-[drop specified capabilities]::mode [basic]:(( + off\:"do not drop capabilities" + basic\:"drop capabilities not needed for standard functionality (retains kill, renice, etc.)" + strict\:"drop capabilities not needed for core functionality" + ))' +) + +_arguments -s -S : $args && ret=0 + +case $state in + sort-keys) + tmp=( ${(f)"$(_call_program sort-keys $words[1] --sort-key help)"} ) + tmp=( ${tmp/#[[:space:]]##} ) + tmp=( ${tmp//:/\\:} ) + tmp=( ${tmp/[[:space:]]##/:} ) + tmp=( ${tmp/(#m):[A-Z]/${(L)MATCH}} ) + _describe -t sort-keys 'column' tmp -M 'b:=M_ b:=IO_' && ret=0 + ;; +esac + +return ret diff --git a/Completion/Unix/Command/_initctl b/Completion/Unix/Command/_initctl deleted file mode 100644 index b60bdbc5b..000000000 --- a/Completion/Unix/Command/_initctl +++ /dev/null @@ -1,184 +0,0 @@ -#compdef initctl start stop restart reload status -# Written by Bernhard Tittelbach -# based on completion script by Mildred - -typeset -g -a -U _initctl_events_list _initctl_eventargs_list - -# run show-config -e and if possible parse out all events and KEY= arguments -# otherwise provide some common values -_initctl_fillarray_events_args () -{ - setopt extendedglob - local showconfig="$(initctl show-config -e 2>| /dev/null)" - if [[ -n "$showconfig" ]]; then - _initctl_events_list=() - _initctl_eventargs_list=() - for cline in "${(f)showconfig}"; do - if [[ "$cline" == (#s)\ \ (stop\ on|start\ on|emit)\ (#b)([[:alpha:]-_]##)(*)(#e) ]]; then - _initctl_events_list+=($match[1]) - # this is a bit tricky, we take the string right of the matched event - # and parse for \sUPPERCASE=\S (in perl-re syntax) substrings until there are no more matches - # since we can't do multiple matches, we concatenated the remaining strings and try again - local stml="$match[2]" - while [[ "$stml" == (#b)(*)\ ([[:upper:]_]##\=)[^[:space:]](#b)(*) ]]; do - _initctl_eventargs_list+=($match[2]) - stml="$match[1] $match[3]" - done - unset stml - fi - done - else - _initctl_events_list=( socket login-session-start desktop-session-start virtual-filesystems local-filesystems remote-filesystems all-swaps filesystem mounting mounted net-device-up start-portmap runlevel unmounted-remote-filesystems ) - _initctl_eventargs_list=( PRIMARY_DEVICE_FOR_DISPLAY= EXIT_STATUS= EXIT_SIGNAL= RUNLEVEL= MOUNTPOINT= TYPE= INTERFACE= ) - fi - return 0 -} - -# list all upstart jobs, i.e. all files in /etc/init/ -_initctl_helper_jobs() -{ - _path_files -W "/etc/init/" -g "*.conf(-.:r)" -} - -# list events, generate array if necessary -_initctl_known_events() -{ - [[ ${#_initctl_events_list} -eq 0 ]] && _initctl_fillarray_events_args - _values "Event" "$_initctl_events_list[@]" -} - -# list events, allow multiple choices, generate array if necessary -_initctl_multiple_known_events() -{ - [[ ${#_initctl_events_list} -eq 0 ]] && _initctl_fillarray_events_args - _values -s "," "event" "$_initctl_events_list[@]" -} - -# list KEY= arguments, generate array if necessary -_initctl_known_eventargs() -{ - [[ ${#_initctl_eventargs_list} -eq 0 ]] && _initctl_fillarray_events_args - _values "argument key" "$_initctl_eventargs_list[@]" -} - -# describe and offer commands for initctl, then call matching completion function -_initctl_command() -{ - local cmds - cmds=( - start:"Start jobs" - stop:"Stop jobs" - restart:"Restart jobs" - reload:"Send SIGHUP to process instance" - status:"Query status of jobs" - list:"List known jobs" - emit:"Emit an event" - reload-configuration:"tell init to reload config files (generally inotify is used)" - version:"Request the version of the init daemon" - log-priority:"Change the minimum priority of log messages from the init daemon" - show-config:"Show start/stop/emit for processes" - check-config:"Find jobs than can't be started" - help:"display list of commands" - ) - - if (( CURRENT == 1 )); then - _describe -t command "initctl command" cmds - fi - - local cmd=$words[1] - - local curcontext="${curcontext%:*}:initctl-${cmd}" - _call_function ret _initctl_${cmd_completion_funcs[${cmd}]-${cmd_completion_default}} -} - -# completion for start/stop/restart/reload i.e. anything that take one job and multiple KEY= arguments's -_initctl_startstop() -{ - _arguments \ - '--no-wait[do not wait for operation to complete before exiting]' \ - "${common_args[@]}" \ - ':upstart job:_initctl_helper_jobs' \ - '*::argument key:_initctl_known_eventargs' -} - -# completion for anything that takes one job -_initctl_argjob() -{ - _arguments \ - "${common_args[@]}" \ - ':upstart job:_initctl_helper_jobs' \ - '*::' -} - -# completion for emit, providing options, one event and multiple KEY= arguments's -_initctl_emit() -{ - _arguments \ - '--no-wait[do not wait for event to finish before exiting]' \ - "${common_args[@]}" \ - ':event:_initctl_known_events' \ - '*::argument key:_initctl_known_eventargs' -} - -# the fallback, just the options -_initctl_basic() -{ - _arguments \ - "${common_args[@]}" -} - -# completion for show-config, additional option and one job -_initctl_show-config() -{ - _arguments \ - "(-e --enumerate)"{-e,--enumerate}"[enumerate emit lines]" \ - "${common_args[@]}" \ - '::upstart job:_initctl_helper_jobs' \ - '*::' -} - -# completion for show-config, additional options and one job -_initctl_check-config() -{ - _arguments \ - "(-i --ignore-events)"{-i,--ignore-events}"[list of comma-separated events to ignore]:Events:_initctl_multiple_known_events" \ - "(-w --warn)"{-w,--warn}"[treat any unknown jobs or events as error]" \ - "${common_args[@]}" \ - '::upstart job:_initctl_helper_jobs' \ - '*::' -} - -# after defining above functions, overwrite _initctl function so helper-functions are loaded only once -_initctl() -{ - local -a common_args - common_args=( - '--session[use D-Bus session bus to connect to init daemon (for testing)]' - '--system[talk via DBUS system bus instead of socket]' - '(-q --quiet)'{-q,--quiet}'[reduce output to errors only]' - '(-v --verbose)'{-v,--verbose}'[increase output to include informational messages]' - '--dest=[specify D-Bus name for init]:D-Bus name [com.ubuntu.Upstart]' - '--help[display help and exit]' - '--version[output version information and exit]' - ) - - # map each initctl function to a completion function - local -A cmd_completion_funcs - cmd_completion_funcs=( start startstop stop startstop restart startstop reload startstop show-config show-config status argjob emit emit check-config check-config ) - - # define fallback completion function - local cmd_completion_default=basic - - # depending on which command was used, call different completion functions - case $service in - initctl) - _arguments "${common_args[@]}" '*::initctl command:_initctl_command' - ;; - start|stop|restart|reload|status) - _call_function ret _initctl_${cmd_completion_funcs[${service}]-${cmd_completion_default}} - ;; - *) return 1 ;; - esac -} - -_initctl "$@" diff --git a/Completion/Unix/Command/_ip b/Completion/Unix/Command/_ip deleted file mode 100644 index d63ddedab..000000000 --- a/Completion/Unix/Command/_ip +++ /dev/null @@ -1,630 +0,0 @@ -#compdef ip - -# This is based on iproute2-ss061214. -# The manual and help text summaries are not consistent with the main -# manual text. I have based this on the main manual text, except where -# it's obviously deficient. - -# -# Values encoding simple types -# -local -a subcmd_dev net_intf_disp net_intf_list -# subcmd_dev=(/$'[[:alnum:][:punct:][:cntrl:][:digit:]]##\0'/ ':interfaces:network interface:_net_interfaces') -_find_net_interfaces -subcmd_dev=(/"(${(j.|.)net_intf_list})"$'\0'/ - ':interfaces:network interface:_net_interfaces') - -local -a subcmd_onoff -subcmd_onoff=(/$'(on|off)\0'/ ':onoff:state (on or off):(on off)') - -local -a subcmd_string -subcmd_string=(/$'[^\0]#\0'/ ':string:arbitrary string:( )') - -local -a subcmd_number -subcmd_number=(/$'[0-9]##\0'/ ': _message -e numbers "decimal number"') - -local xp='[[:xdigit:]][[:xdigit:]]' -local -a subcmd_lladdr -subcmd_lladdr=(/"${xp}:${xp}:${xp}:${xp}:${xp}:${xp}"$'\0'/ - ': _message -e lladdresses "link layer (MAC) address"') - -local -a subcmd_ipaddr -subcmd_ipaddr=( - /$'(<->(.<->(.<->(.<->|)|)|)|[:[:xdigit]]#:[:[:xdigit:]]#)(|/<->)\0'/ - ':ipaddress:IP address (v4 or v6) with optional /<network-prefix-length>:( )' -) - -local -a subcmd_ipaddrs -local PATH=$PATH -PATH=/sbin:$PATH -subcmd_ipaddrs=( - /$'(<->(.<->(.<->(.<->|)|)|)|[:[:xdigit]]#:[:[:xdigit:]]#)(|/<->)\0'/ - ":ipaddress:IP address (v4 or v6) currently set:( $(ip addr show | sed -n 's/^ *inet6* \([0-9a-f\.:/]*\) .*$/\1/p') )" -) -local -a subcmd_prefix_label -subcmd_prefix_label=( - /$'(<->(.<->(.<->(.<->|)|)|)|[:[:xdigit]]#:[:[:xdigit:]]#)(|/<->)\0'/ - ":ipaddresslabel:IP addrlabel prefix currently set:( $(ip -6 addrlabel list 2>/dev/null | sed -n 's/^prefix \([0-9a-f\.:/]*\) .*$/\1/p') )" -) - - -local -a subcmd_scope -_regex_words scope "IP address scope" \ - 'global:address globally valid' \ - 'site:address valid for site (IPv6)' \ - 'link:address valid for single link' \ - 'host:address valid for this host' -subcmd_scope=("$reply[@]") - -local -a subcmd_nud -_regex_words nud "neighbour unreachability detection state" \ - 'permanent:valid forever' \ - 'noarp:valid, not validated, removed if expired' \ - 'reachable:valid until reachability timeout' \ - 'stale:valid but suspicious' -subcmd_nud=("$reply[@]") - -local -a subcmd_rttype -_regex_words route-type "route type" \ - 'unicast:real point-to-point route' \ - 'unreachable:generate Host Unreachable messages' \ - 'blackhole:silently discard' \ - 'prohibit:generate Communication Administratively Prohibited messages' \ - 'local:Loopback route' \ - 'broadcast:destinations are broadcast addresses' \ - 'throw:used with policy rules, generate Net Unreachable if no route' \ - 'nat:Network Address Translation route' \ - 'anycast:anycast addresses, not implemented' \ - 'multicast:multicast routing, not present in normal tables' -subcmd_rttype=("$reply[@]") - -local -a subcmd_route -# Route type is optional in route. -# There's an overall default but then the whole thing is missed -# out, and it's marked as optional anyway. -subcmd_route=("(" $subcmd_rttype "|" ")" $subcmd_ipaddr) - -local -a subcmd_tos -_regex_words tos "service type" \ - 'lowdelay:low latency' \ - 'throughput:high bulk throughput' \ - 'reliability:high reliability' -subcmd_tos=("(" "$reply[@]" "|" - /$'(|0x)[[:xdigit:]]##\0'/ ":hex-numbers:8-bit hex number:( )" ")") - -local -a subcmd_lockmtu -subcmd_lockmtu=("(" /$'lock\0'/ ":lock:lock:(lock)" "|" ")" $subcmd_number ) - -local -a subcmd_nexthop -_regex_words nexthop 'nexthop route keyword' \ - 'via:specify nexthop router:$subcmd_ipaddr' \ - 'dev:specify output device:$subcmd_dev' \ - 'weight:specify relative quality of route:$subcmd_number' -subcmd_nexthop=("$reply[@]" "#") - -local -a subcmd_rtprotocol -_regex_words rtprotocol 'route protocol' \ - 'redirect:installed from ICMP redirect' \ - 'kernel:installed automatically by kernel' \ - 'boot:installed during boot sequence' \ - 'static:installed by administrator' \ - 'ra:installed by Router Discovery protocol' -subcmd_rtprotocol=("$reply[@]") - -local -a subcmd_rttable -_regex_words rttable 'routing table' \ - 'local:local routes' \ - 'main:main routing table' \ - 'default:default routing table' \ - 'unspec:unspecified routing table' -subcmd_rttable=("(" "$reply[@]" "|" $subcmd_number ")") - -local -a subcmd_rtrealm subcmd_rtrealms -_regex_words -t / rtrealm 'routing realm' \ - 'cosmos:everywhere' -subcmd_rtrealms=("(" "$reply[@]" "|" /$'[0-9]##/'/ - ':numbers:decimal number:( )' ")") - -_regex_words rtrealm 'routing realm' \ - 'cosmos:everywhere' -subcmd_rtrealm=("(" "$reply[@]" "|" $subcmd_number ")") -subcmd_rtrealms+=($subcmd_rtrealm) - -local -a subcmd_rtselector -_regex_words rtselmod 'routing selector modifier' \ - 'root:select minimum route prefix length to match' \ - 'match:select maximum route prefix length to match' \ - 'exact:select exact prefix length to match' -subcmd_rtselector=("(" "$reply[@]" "|" ")" $subcmd_ipaddr) - -local -a subcmd_family -_regex_words family 'protocol family' \ - 'inet:IPv4' \ - 'inet6:IPv6' \ - 'link:local, no networking protocol' -subcmd_family=("$reply[@]") - -local -a subcmd_ruletypes -_regex_words ruletype 'rule type' \ - 'unicast:rule applies to a route' \ - 'blackhole:rule silently drops packet' \ - 'unreachable:rule generates Network Unreachable messages' \ - 'prohibit:rule generates Communication Administratively Prohibited messages' \ - 'nat:rule prescribes translation of source IP address' -subcmd_ruletypes=("$reply[@]") - -local -a subcmd_tunnelmode -_regex_words tunnelmode 'tunnel mode' \ - 'ipip:IPv4 in IPv4 tunnel' \ - 'sit:Simple Internet Transition - IPv6 in IPv4 tunnel' \ - 'gre:Generic Route Encapsulation - IPv4/IPv6 in IPv4 tunnel' -subcmd_tunnelmode=("$reply[@]") - -local -a subcmd_linktype -subcmd_linktype=(/$'[^\0]##\0'/ ':link-types:link type:(bridge bond dummy hsr ifb ipoib macvlan macvtap vcan veth vlan vxlan ip6tnl ipip sit gre gretap ip6gre ip6gretap vti nlmon ipvlan lowpan geneve macsec vrf)') - -local -a subcmd_files -subcmd_files=(/$'[^\0]##\0'/ ':files:file:_files') - -# -# The ip top-level commands. First link -# - -local -a link_common_cmds -link_common_cmds=( - 'txq*ueuelen:specify length of transmit queue:$subcmd_number' \ - 'ad*dress:specify unicast link layer (MAC) address:$subcmd_lladdr' \ - 'br*oadcast:specify broadcast link layer (MAC) address:$subcmd_lladdr' \ - 'm*tu:specify maximum transmit unit:$subcmd_number' -) -local -a link_add_cmds -_regex_words \ - link-add-commands 'link add command' $link_common_cmds \ - 'link:specify device:$subcmd_dev' \ - 'name:specify name' \ - 'type:specify type:$subcmd_linktype' \ - 'numtxqueues:specify number of transmit queues:$subcmd_number' \ - 'numrxqueues:specify number of receive queues:$subcmd_number' \ - 'index:specify desired index' \ - 'group:multicast IP address to join:$subcmd_lladdr' -link_add_cmds=( "$reply[@]" "#" ) - -local -a link_set_cmds -_regex_words \ - link-set-commands 'link set command' \ - 'dev:specify device:$subcmd_dev' \ - 'u*p:change state to up' \ - 'do*wn:change state to down' \ - 'ar*p:change ARP flag on device:$subcmd_onoff' \ - 'mu*lticast:change MULTICAST flag on device:$subcmd_onoff' \ - 'allmulticast:change allmulticast flag on device:$subcmd_onoff' \ - 'pr*omisc:set promiscuous mode:$subcmd_onoff' \ - 'protodown:change the PROTODOWN state on the device:$subcmd_onoff' \ - 'dy*namic:change DYNAMIC flag on device:$subcmd_onoff' \ - 'n*ame:change name of device:$subcmd_string' \ - 'txq*ueuelen:specify length of transmit queue:$subcmd_number' \ - 'txql*en:specify length of transmit queue:$subcmd_number' \ - 'm*tu:specify maximum transmit unit:$subcmd_number' \ - 'ad*dress:specify unicast link layer (MAC) address:$subcmd_lladdr' \ - 'br*oadcast:specify broadcast link layer (MAC) address:$subcmd_lladdr' \ - 'brd:specify broadcast link layer (MAC) address:$subcmd_lladdr' \ - 'p*eer:specify peer link layer (MAC) address:$subcmd_lladdr' -# can complete interface with no dev, subcommands can repeat... -link_set_cmds=("(" $subcmd_dev "|" ")" "$reply[@]" "#" ) - -local -a link_show_cmds -_regex_words link-show-commands 'link show command' \ - 'dev:specify device:$subcmd_dev' \ - 'up:limit display to running devices' -link_show_cmds=("(" $subcmd_dev "|" ")" "$reply[@]" "#" ) - -local -a link_cmds -_regex_words \ - link-commands "link command" \ - 'a*dd:add virtual link:$link_add_cmds' \ - 'h*elp:show help for command' \ - 'se*t:change device attributes:$link_set_cmds' \ - 'sh*ow:display device attributes:$link_show_cmds' -link_cmds=("$reply[@]") - -# -# addr -# - -local -a addr_add_cmds -# TODO: broadcast can take + or = -_regex_words addr-add-commands "addr add/remove/change/replace commands" \ - 'dev:specify device:$subcmd_dev' \ - 'lo*cal:specify local IP address:$subcmd_ipaddr' \ - 'p*eer:specify peer IP address (point-to-point):$subcmd_ipaddr' \ - 'b*roadcast:specify broadcast IP address:$subcmd_ipaddr' \ - 'la*bel:specify tag for device:$subcmd_string' \ - 's*cope:specify scope for address:$subcmd_scope' \ - 'valid_lft:specify valid lifetime of this address' \ - 'preferred_lft:specify valid lifetime of this address' \ - 'home:designate this address as the "home address" (IPv6)' \ - 'mngtmpaddr:manage temporary addresses created from this one as template on behalf of Privacy Extensions' - -# can complete IP address with no keyword -addr_add_cmds=("(" $subcmd_ipaddr "|" ")" "$reply[@]" "#" ) - -local -a addr_del_cmds -addr_del_cmds=("(" $subcmd_ipaddrs "|" "$reply[@]" ")" "#" ) - -local -a addr_show_cmds -# TODO: broadcast can take + or = -_regex_words addr-show-commands "addr show commands" \ - 'dev:specify device:$subcmd_dev' \ - 'up:limit display to running devices' \ - 's*cope:specify scope for address:$subcmd_scope' \ - 't*o:limit to given IP address/prefix:$subcmd_ipaddr' \ - 'la*bel:list tags matching glob pattern:$subcmd_string' \ - 'dynamic:list addresses from stateless configuration (IPv6)' \ - 'permanent:list non-dynamic addresses (IPv6)' \ - 'tentative:list addresses failing duplicate address detection (IPv6)' \ - 'deprecated:list deprecated addresses (IPv6)' \ - 'primary:list only primary addresses' \ - 'secondary:list only secondary addresses' -# can complete device with no keyword -addr_show_cmds=("(" $subcmd_dev "|" ")" "$reply[@]" "#" ) - -local -a addr_cmds -_regex_words \ - addr-commands "addr command" \ - 'h*elp:show help for command' \ - 'a*dd:add new protocol address:$addr_add_cmds' \ - 'c*hange:change existing protocol address:$addr_add_cmds' \ - 'r*eplace:add or update protocol address:$addr_add_cmds' \ - 'd*elete:delete protocol address:$addr_del_cmds' \ - 's*how:show protocol address:$addr_show_cmds' \ - 'f*lush:flush protocol address:$addr_show_cmds' -addr_cmds=("$reply[@]") - -# -# addrlabel -# - -local -a addrlabel_add_cmds -_regex_words addrlabel-add-commands "addlabel add command" \ - 'p*refix: limit to given IP address/prefix' \ - 'd*ev: specify device:$subcmd_dev' \ - 'l*abel: number' -addrlabel_add_cmds=( "(" $subcmd_ipaddr "|" ")" "$reply[@]" "#") - -local -a addrlabel_del_cmds -_regex_words addrlabel-add-commands "addlabel del command" \ - 'p*refix: limit to given IP address/prefix:$subcmd_prefix_label' \ - 'd*ev: specify device:$subcmd_dev' \ - 'l*abel: number:$subcmd_number' -addrlabel_del_cmds=( "(" $subcmd_ipaddr "|" ")" "$reply[@]" "#") - - -local -a addrlabel_cmds -_regex_words \ - addrlabel-commands "addrlabel command" \ - 'h*elp: show help for command' \ - 'a*dd: add an address labels:$addrlabel_add_cmds' \ - 'd*el: delete an address labels:$addrlabel_del_cmds' \ - 'l*ist: list address labels' \ - 'f*lush: flush address labels' -addrlabel_cmds=("$reply[@]") - -# -# neigh -# - -local -a neigh_add_cmds -_regex_words neigh-add-commands "neighbour add command" \ - 't*o:add new neighbour IP address:$subcmd_ipaddr' \ - 'dev:specify network device:$subcmd_dev' \ - 'l*laddr:specify link layer (MAC) address or null:$subcmd_lladdr' \ - 'n*ud:specify neighbour unreachability detection state:$subcmd_nud' -# to-address without keyword can appear first -neigh_add_cmds=( "(" $subcmd_ipaddr "|" ")" "$reply[@]" "#") - -local -a neigh_del_cmds -_regex_words neigh-add-commands "neighbour delete command" \ - 't*o:remove neighbour IP address:$subcmd_ipaddr' \ - 'dev:specify network device:$subcmd_dev' -neigh_del_cmds=( "(" $subcmd_ipaddr "|" ")" "$reply[@]" "#") - -local -a neigh_show_cmds -_regex_words neigh-show-commands "neighbour show command" \ - 't*o:select neighbours by prefix:$subcmd_ipaddr' \ - 'dev:select neighbours by device:$subcmd_dev' \ - 'u*nused:only list unused neighbours' \ - 'n*ud:only list neighbours in given state:$subcmd_nud' -neigh_show_cmds=( "(" $subcmd_ipaddr "|" ")" "$reply[@]" "#" ) - -local -a neigh_cmds -_regex_words \ - neigh-commands "neigh command" \ - 'h*elp:show help for command' \ - 'a*dd:add new neighbour entry:$neigh_add_cmds' \ - 'c*hange:change existing neighbour entry:$neigh_add_cmds' \ - 'r*eplace:add or change neighbour entry:$neigh_add_cmds' \ - 'd*elete:delete neighbour entry:$neigh_del_cmds' \ - 's*how:list neighbour entries:$neigh_show_cmds' \ - 'f*lush:flush neighbour entries:$neigh_show_cmds' -neigh_cmds=("$reply[@]") - - -# -# route -# - -local -a route_add_cmds -_regex_words route-add-commands "route add/change/replace command" \ - 'to:route destination prefix:$subcmd_route' \ - 'tos:type of service:$subcmd_tos' \ - 'ds*field:type of service:$subcmd_tos' \ - 'me*tric:preference value of route:$subcmd_number' \ - 'pre*ference:preference value of route:$subcmd_number' \ - 'ta*ble:select table by ID:$subcmd_rttable' \ - 'dev:select device:$subcmd_dev' \ - 'v*ia:select nexthop router:$subcmd_ipaddr' \ - 'sr*c:select preferred source address:$subcmd_ipaddr' \ - 're*alm:select routing realm:$subcmd_rtrealm' \ - 'mtu:select maximum transport unit:$subcmd_lockmtu' \ - 'w*indow:select maximal window in bytes:$subcmd_number' \ - 'rtt:select round trip time estimate:$subcmd_number' \ - 'rttv*ar:select initial round trip variance estimate:$subcmd_number' \ - 'ss*thresh:select initial slow start threshold estimate:$subcmd_number' \ - 'cw*nd:select clamp for congestion window (only if locked):$subcmd_number' \ - 'in*itcwnd:select max initial cwnd in MSS:$subcmd_number' \ - 'ad*vmss:select maximal segment size advertised:$subcmd_number' \ - 're*ordering:select maximal reordering for path:$subcmd_number' \ - 'ne*xthop:select nexthop of multipath route:$subcmd_nexthop' \ - 'sc*ope:select scope of destinations:$subcmd_scope' \ - 'pro*tocol:select routing protocol identifier:$subcmd_rtprotocol' \ - 'onl*ink:pretend nexthop is directly attached' \ - 'eq*ualize:allow packet by packet randomization' -# route can appear with no "to" -route_add_cmds=("(" $subcmd_route "|" ")" "$reply[@]" "#") - -local -a route_show_cmds -_regex_words route-show-commands "route show command" \ - 'to:select route via prefix:$subcmd_rtselector' \ - 'tos:type of service:$subcmd_tos' \ - 'ta*ble:select table by ID:$subcmd_rttable' \ - 'cl*oned:list only dynamically forked routes' \ - 'ca*ched:list only dynamically forked routes' \ - 'f*rom:select route via source address prefix:$subcmd_rtselector' \ - 'p*rotocol:select routing protocol identifier:$subcmd_rtprotocol' \ - 'sc*ope:select scope of destinations:$subcmd_scope' \ - 'ty*pe:route type:$subcmd_rttype' \ - 'dev:select device:$subcmd_dev' \ - 'v*ia:select nexthop router:$subcmd_ipaddr' \ - 'sr*c:select route via source prefix:$subcmd_ipaddr' \ - 'realm:select routing realm:$subcmd_rtrealm' \ - 'realms:select from/to routing realms:$subcmd_rtrealms' -# route selector can appear with no "to" -route_show_cmds=("(" $subcmd_rtselector "|" ")" "$reply[@]" "#") - -local -a route_get_cmds -_regex_words route-get-commands "route get commands" \ - 'to:route destination:$subcmd_ipaddr' \ - 'f*rom:route source:$subcmd_ipaddr' \ - 'tos:select type of service:$subcmd_tos' \ - 'ds*field:type of service:$subcmd_tos' \ - 'iif:select input interface (device):$subcmd_dev' \ - 'oif:select output interface (device):$subcmd_dev' \ - 'c*onnected:use preferred address as source' -route_get_cmds=("(" $subcmd_ipaddr "|" ")" "$reply[@]" "#") - -local -a route_cmds -_regex_words \ - route-commands "route command" \ - 'h*elp:show help for command' \ - 'a*dd:add new network route:$route_add_cmds' \ - 'c*hange:change existing network route:$route_add_cmds' \ - 'r*eplace:add or change network route:$route_add_cmds' \ - 'd*elete:delete network route:$route_add_cmds' \ - 's*how:list network routes:$route_show_cmds' \ - 'f*lush:flush network routes:$route_show_cmds' \ - 'g*et:get a single network route:$route_get_cmds' -route_cmds=("$reply[@]") - -# -# rule -# - -local -a rule_add_cmds -_regex_words rule-add-commands 'ip rule add/delete commands' \ - 'ty*pe:type of rule:$subcmd_ruletypes' \ - 'fr*om:select source prefix:$subcmd_ipaddr' \ - 'to:select destination prefix:$subcmd_ipaddr' \ - 'iif:select input interface (device):$subcmd_dev' \ - 'tos:select type of service:$subcmd_tos' \ - 'ds*field:select type of service:$subcmd_tos' \ - 'fw*mark:select fwmark:$subcmd_string' \ - 'pr*iority:select unique priority for rule:$subcmd_number' \ - 'ta*ble:select routing table by ID:$subcmd_rttable' \ - 're*alms:select from/to routing realms:$subcmd_rtrealms' \ - 'nat:select base of IP block to translate:$subcmd_ipaddr' - -rule_add_cmds=("(" $subcmd_ruletypes "|" ")" "$reply[@]" "#") - -local -a rule_cmds -_regex_words \ - rule-commands "rule command" \ - 'h*elp:show help for command' \ - 'a*dd:insert a new routing rule:$rule_add_cmds' \ - 'd*elete:delete a routing rule:$rule_add_cmds' \ - 'f*lush:flush rules and dump deleted rules' \ - 's*how:list routing rules' -rule_cmds=("$reply[@]") - -# -# tunnel -# - -local -a tunnel_add_cmds -_regex_words tunnel-add-commands 'tunnel add/change/delete commands' \ - 'na*me:select tunnel device name:$subcmd_dev' \ - 'm*ode:select tunnel mode:$subcmd_tunnelmode' \ - 'r*emote:select remote endpoint address:$subcmd_ipaddr' \ - 'l*ocal:select local address:$subcmd_ipaddr' \ - 'ttl:set fixed time to live, 1 to 255 or 0 (inherit):$subcmd_number' \ - 'tos:select type of service:$subcmd_tos' \ - 'ds*field:select type of service:$subcmd_tos' \ - 'dev:select device to bind tunnel to:$subcmd_dev' \ - 'no*pmtudisc:disable path maximum transport unit discovery' \ - 'ik*ey:set input key for GRE tunnel:$subcmd_ipaddr' \ - 'ok*ey:set output key for GRE tunnel:$subcmd_ipaddr' \ - 'k*ey:set bidirectional key for GRE tunnel:$subcmd_ipaddr' \ - 'ic*sum:enable input checksums for GRE tunnel' \ - 'oc*sum:enable output checksums for GRE tunnel' \ - 'c*sum:enable bidirectional checksums for GRE tunnel' \ - 'is*eq:serialize input packets on GRE tunnel' \ - 'os*eq:serialize output packets on GRE tunnel' \ - 's*eq:serialize packets bidirectionally on GRE tunnel' -# name is default... we always complete it as an interface, -# although that's not really right for "add". -tunnel_add_cmds=("$reply[@]" "#") - -local -a tunnel_cmds -_regex_words \ - tunnel-commands "tunnel command" \ - 'h*elp:show help for command' \ - 'a*dd:add a new IP tunnel:$tunnel_add_cmds' \ - 'c*hange:change an existing IP tunnel:$tunnel_add_cmds' \ - 'd*el:destroy an IP tunnel:$tunnel_add_cmds' \ - 's*how:list IP tunnels' -tunnel_cmds=("$reply[@]") - -# -# maddr -# - -local -a maddr_add_cmds -_regex_words maddr-add-commands "maddr add/delete command" \ - 'a*ddress:select link layer (MAC) address:$subcmd_lladdr' \ - 'dev:select device to bind multicast address to:$subcmd_dev' -maddr_add_cmds=("(" $subcmd_ipaddr "|" ")" "$reply[@]" "#") - -local -a maddr_show_cmds -_regex_words maddr-show-commands 'maddr show command' \ - 'dev:select device with multicast address(es):$subcmd_dev' -# device is default argument but if given the "dev" is useless -maddr_show_cmds=("(" $subcmd_dev "|" "$reply[@]" ")") - -local -a maddr_cmds -_regex_words \ - maddr-commands "maddr command" \ - 'h*elp:show help for command' \ - 'a*dd:add multicast address:$maddr_add_cmds' \ - 'd*elete:delete multicast address:$maddr_add_cmds' \ - 's*how:list multicast addresses:$maddr_show_cmds' -maddr_cmds=("$reply[@]") - -# -# mroute -# - -local -a mroute_show_cmds -_regex_words mroute-show-commands "mroute show command" \ - 'to:select destination prefix:$subcmd_ipaddr' \ - 'iif:select input interface (device):$subcmd_dev' \ - 'from:select source prefix:$subcmd_ipaddr' -mroute_show_cmds=("(" $subcmd_ipaddr "|" ")" "$reply[@]") - -local -a mroute_cmds -_regex_words \ - mroute-commands "mroute command" \ - 'h*elp:show help for command' \ - 's*how:list multicast routing cache entries:$mroute_show_cmds' -mroute_cmds=("$reply[@]") - -# -# monitor -# - -local -a monitor_cmds -_regex_words \ - monitor-commands "monitor command" \ - 'h*elp:show help for command' \ - 'all:monitor all changes' \ - 'link:monitor changes to links' \ - 'address:monitor changes to addresses' \ - 'route:monitor changes to routes' \ - 'file:read rtmon-generated log:$subcmd_files' -monitor_cmds=("$reply[@]") - -# -# Global argument handling -# - -# Arguments to _regex_arguments, built up in array $args. -local -a args reply -args=( - # Command word. Don't care what that is. - /$'[^\0]#\0'/ -) - -_regex_words options "ip option" \ - '-V*ersion:display version information' \ - '-h*uman-readable:output statistics with human readable values' \ - '-b*atch:read commands from specified file:$subcmd_files' \ - '-force:do not terminate on errors in batch mode' \ - '-i*ec:print human readable rates in IEC units (ie. 1K = 1024)' \ - '-s*tatistics:output statistics' \ - '-d*etails:output more detailed information' \ - '-c*olor:color output' \ - '-br*ief:brief output' \ - '-a*ll:executes specified command over all objects' \ - '-l*oops:specify maximum loops ip address flush logic will attempt:$subcmd_number' \ - '-f*amily:select protocol family:$subcmd_family' \ - '-4:IPv4' \ - '-6:IPv6' \ - '-B:family bridge' \ - '-D:family DECnet' \ - '-I:family IPX' \ - '-M:family MPLS' \ - '-0:link protocol, no networking' \ - '-o*neline:output one record per line' \ - '-j*son:output results in JSON' \ - '-p*retty:pretty print JSON' \ - '-r*esolve:use system resolver for DNS names' \ - '-n*etns:switch to specified network namespace:$subcmd_string' \ - '-N*umeric:print numbers instead of converting to text forms' \ - '-a*ll:execute specified command over all objects' \ - '-c*olor:use color output' \ - '-t*imestamp:display current time when using monitor option' \ - '-ts*hort:like -timestamp, but use shorter format' \ - '-rc*vbuf:set the netlink socket receive buffer size:$subcmd_number' \ - '-iec:print human readable rates in IEC units' \ - '-j*son:output results in JSON format' \ - '-echo:request the kernel to send applied changes back' -args+=("$reply[@]" "#") - -_regex_words \ - commands "ip command" \ - 'l*ink:configure network device:$link_cmds' \ - 'addrlabel:manage addrlabel:$addrlabel_cmds' \ - 'a*ddr:manage protocol address:$addr_cmds' \ - 'r*oute:manage routing table:$route_cmds' \ - 'ru*le:manage routing policy database:$rule_cmds' \ - 'n*eigh:manage neighbour/ARP tables:$neigh_cmds' \ - 'nt*able:manage the neighbor cache operation' \ - 't*unnel:configure tunnel:$tunnel_cmds' \ - 'net*ns:manage network namespaces' \ - 'l2*tp:tunnel ethernet over IP (L2TPv3)' \ - 'f*ou:UDP receive port configuration' \ - 'mac*sec:MACsec device configuration' \ - 'tcp_metrics:manage TCP metrics' \ - 'token:manage tokenized interface identifiers' \ - 'netc*onf:network configuration monitoring' \ - ila ioam mptcp nexthop vrf sr stats \ - 'm*addr:manage multicast addresses:$maddr_cmds' \ - 'mr*oute:manage multicast routing cache:$mroute_cmds' \ - 'mru*le:multicast routing policy database' \ - 'mo*nitor:monitor state:$monitor_cmds' \ - 'tunt*ap:manage TUN/TAP devices' \ - 'x*frm:manage IPSec policies' \ - 'help' -args+=("$reply[@]") - -_regex_arguments _ip "${args[@]}" - -_ip "$@" diff --git a/Completion/Unix/Command/_loadkeys b/Completion/Unix/Command/_loadkeys deleted file mode 100644 index d0a87b6f6..000000000 --- a/Completion/Unix/Command/_loadkeys +++ /dev/null @@ -1,19 +0,0 @@ -#compdef loadkeys - -case $OSTYPE in - linux*) - _arguments \ - '(--clearcompose -c)'{--clearcompose,-c}'[clear kernel compose table]' \ - '(--default -d)'{--default,-d}'[load default keymap file]' \ - '(--help -h)'{--help,-h}'[display help information]' \ - '(--mktable -m)'{--mktable,-m}'[output a "defkeymap.c" to stdout]' \ - '(--clearstrings)'{--clearstrings,-s}'[clear kernel string table]' \ - '*'{--verbose,-v}'[print more details]' \ - ':keymap:_files -W /usr/share/keymaps' - ;; - solaris*) - _files -W /usr/share/lib/keytables - ;; - - *) _default;; -esac diff --git a/Completion/Unix/Command/_monotone b/Completion/Unix/Command/_monotone deleted file mode 100644 index bcaab87f0..000000000 --- a/Completion/Unix/Command/_monotone +++ /dev/null @@ -1,43 +0,0 @@ -#compdef mtn - -local -a cmds -cmds=( - automate:automation db:database fdiff:debug fload:debug fmerge:debug - get_roster:debug identify:debug rcs_import:debug annotate:informative - cat:informative complete:informative diff:informative help:informative - list:informative log:informative ls:informative show_conflicts:informative - status:informative cert:key+cert chkeypass:key+cert dropkey:key+cert - genkey:key+cert trusted:key+cert pull:network push:network serve:network - sync:network privkey:packet\ i/o pubkey:packet\ i/o read:packet\ i/o - cvs_import:rcs approve:review comment:review disapprove:review tag:review - testresult:review checkout:tree co:tree explicit_merge:tree heads:tree - merge:tree merge_into_dir:tree migrate_workspace:tree propagate:tree - refresh_inodeprints:tree setup:tree set:vars unset:vars add:workspace - attr:workspace ci:workspace commit:workspace drop:workspace mv:workspace - pivot_root:workspace pluck:workspace rename:workspace revert:workspace - rm:workspace update:workspace -) - -_arguments \ - '--brief[print a brief version of the normal output]' \ - '--confdir[set location of configuration directory]:confdir:_files -/' \ - '(-d --db)'{-d,--db}'[set name of database]:dbname' \ - '--debug[print debug log to stderr while running]' \ - '--dump[file to dump debugging log to, on failure]:dumpfile:_files' \ - '--full-version[print detailed version number, then exit]' \ - '(-h --help)'{-h,--help}'[display help message]' \ - '(-k --key)'{-k,--key}'[set key for signatures]:key:' \ - '--keydir[set location of key store]:keydir:_files -/' \ - '--log[file to write the log to]:logfile:_files' \ - '--norc[do not load ~/.monotone/monotonerc or _MTN/monotonerc lua files]' \ - '--nostd[do not load standard lua hooks]' \ - '--pid-file[record process id of server]:arg:' \ - '--quiet[suppress verbose, informational and progress messages]' \ - '--rcfile[load extra rc file]:extra rcfile:_files' \ - '--reallyquiet[suppress warning, verbose, informational and progress messages]' \ - '--root[limit search for workspace to specified root]:root:_files -/' \ - '--ticker[set ticker style]:ticker style:(count dot none)' \ - '--version[print version number, then exit]' \ - '(-@ --xargs)'{-@,--xargs}'[insert command line arguments taken from the given file]:file:_files' \ - '1:command: _describe -t commands command cmds' \ - '*:file:_files' diff --git a/Completion/Unix/Command/_moosic b/Completion/Unix/Command/_moosic deleted file mode 100644 index 475a0c75c..000000000 --- a/Completion/Unix/Command/_moosic +++ /dev/null @@ -1,487 +0,0 @@ -#compdef moosic - -_moosic_add_cmds() { - - # querying for information - typeset -a queries - queries=( - "help:print brief description of command" - "current:print name of currently playing song" - "current-time:print the amount of time the current song has been playing" - "list:print the list of items in the current song queue" - "plainlist:print the current song queue without numbering each line" - "history:print a list of items that were recently played" - {status,state}":print the current state of the music daemon" - "length:print the number of items in the queue" - "ispaused:show whether the current song is paused or not" - "islooping:show whether the server is in loop mode" - "isadvancing:show whether the server is advancing through the song queue" - "version:print version information for client and server" - ) - - - # appending to song queue - typeset -a appending - appending=( - {append,add}":add the files to be played to the end of the song queue" - {pl-append,pl-add}":add the items listed in the given playlist files to end of queue" - "prepend:add the files to be played to the beginning of the song queue" - "pl-prepend:add the items in the given playlist files to beginning of queue" - "mixin:add the files to the song queue and reshuffle the entire queue" - "pl-mixin:add items in given playlist files to song queue and reshuffle the entire queue" - "replace:replace the current contents of the song queue with files listed" - "pl-replace:replace current contents of song queue with songs given in playlists" - "insert:insert the given items at a given point in the song queue" - "pl-insert:insert items from playlist files at specified point in queue" - "putback:reinsert current song at start of song queue" - "stagger-add:adds file list to end of queue after rearranging queue into staggered order" - "stagger-merge:adds given file list to queue in interleaved fashion" - "interval-add:inserts given songs with regular frequency specified by interval argument" - ) - - # removing - typeset -a removing - removing=( - {cut,del}":removes all song queue items in given range" - "crop:removes all song queue items that do not fall within given range" - "remove:remove all song queue items matching any one of given regexps" - "filter:remove all queue items not matching all given regexps" - "clear:clear song queue" - "wipe:clear song queue and stop current song" - ) - - # rearranging - typeset -a rearranging - rearranging=( - "move:move all items in given range to new position in song queue" - "move-pattern:moves all items matching the given regexp to new position" - "swap:trade places of songs in two specified ranges" - {shuffle,reshuffle}":reshuffle song queue within an optional range" - "sort:sort queue within optional range" - "reverse:reverse order of song queue" - "partial-sort:sort items matching each regexp" - "stagger:stagger items matching each regexp" - "sub:perform regular expression substitution on all items in queue" - "suball:like sub, but replace all occurrences of the pattern" - ) - - # general management - typeset -a general - general=( - "next:jumps ahead, number of songs optional" - "previous:retreats to previously played song" - "goto:jumps to next song matching regexp" - "gobackto:jumps back to most recent previous song matching regexp" - "noadvance:halt queue advancement" - "advance:resume queue advancement" - "toggle-advance:toggle queue advancement" - "stop:stop playing current song, stop processing queue, put current song back" - "pause:suspend current song to resume it later" - "unpause:unpause current song" - "play:resume playing" - "loop:turn loop mode on" - "noloop:turn loop mode off" - "toggle-loop:toggle loop mode" - "reconfigure:daemon reload configuration file" - "showconfig:show daemon filetype associations" - "start-server:starts new instance of daemon with given options" - {quit,exit,die}":quit daemon" - ) - - _describe queries queries -J queries - _describe appending appending -J appending - _describe removing removing -J removing - _describe rearranging rearranging -J rearranging - _describe general general -J general -} - -_moosic() { - typeset context state line - typeset -A opt_args - - typeset -a filelist_opts - filelist_opts=( - '(-g --shuffle-global)'{-g,--shuffle-global}'[shuffle filelist after directory expansion]' - '(-d --shuffle-dir)'{-d,--shuffle-dir}'[shuffle results of expanding the directories]' - '(-a --shuffle-args)'{-a,--shuffle-args}'[shuffle actual command line arguments]' - '(-o --inorder)'{-o,--inorder}'[do not shuffle filelist]' - '(-s --sort)'{-s,--sort}'[sort filelist lexicographically after expansion]' - '(-r --no-recurse)'{-r,--no-recurse}'[do not recurse through directories]' - '(-n --no-file-munge)'{-n,--no-file-munge}'[do not modify names in expanded filelist]' - '(-f --auto-find)'{-f,--auto-find}'[perform fuzzy search for music files]' - '(-F --auto-grep)'{-F,--auto-grep}'[like --auto-find but with regexp]' - '(-U --allow-unplayable)'{-U,--allow-unplayable}'[allow addition of unknown song types]' - ) - - typeset -a auto_opts - auto_opts=( - '(-m --music-dir)'{-m,--music-dir}'[directory used for auto-find, auto-grep]:directory:_files' - ) - - typeset -a main_opts - main_opts=( - '(-i --ignore-case)'{-i,--ignore-case}'[treat regexps as if they are case-insensitive]' - '(-S --showcommands)'{-S,--showcommands}'[show all moosic commands, then exit]' - '(-h --help)'{-h,--help}'[print help message then exit]' - '(-v --version)'{-v,--version}'[print version information, then exit]' - '(-c --config-dir)'{-c,--config-dir}'[configuration directory]:directory:_files' - '(-t --tcp)'{-t,--tcp}'[talk to server at specified host and port]:host\:port:' - '(-N --no-startserver)'{-N,--no-startserver}'[do not start moosicd server]' - ) - - typeset -a list_opts - list_opts=( - '(-C --current-in-list)'{-C,--current-in-list}'[print currently playing song in list]' - ) - - # GLOBAL ARGUMENTS - # do not use the -A option here. It will break the processing of - # positional arguments. - _arguments $main_opts $list_opts $auto_opts $filelist_opts \ - '1: :->cmd' \ - '*:: :->posarg' - - if [[ $state == cmd ]]; then - _moosic_add_cmds - elif [[ $state == posarg ]]; then - _moosic_cmd_${line[1]} - fi -} - -# Do something, but only if the current word is 2. -_do2() { - if (( CURRENT == 2 )); then - $@ - else - _message 'no more arguments' - fi -} - -### QUERY COMMANDS - -_moosic_cmd_help() { - _do2 '_moosic_add_cmds' -} - -_moosic_cmd_current() { - _message 'no arguments' -} - -_moosic_cmd_current-time() { - _do2 '_message' 'strftime string' -} - -_moosic_cmd_list() { - _do2 '_message' 'range' -} - -_moosic_cmd_plainlist() { - _do2 '_message' 'range' -} - -_moosic_cmd_history() { - _do2 '_message' 'maximum number of entries' -} - -_moosic_cmd_status() { - _message 'no arguments' -} - -_moosic_cmd_state() { - _message 'no arguments' -} - -_moosic_cmd_length() { - _message 'no arguments' -} - -_moosic_cmd_ispaused() { - _message 'no arguments' -} - -_moosic_cmd_islooping() { - _message 'no arguments' -} - -_moosic_cmd_isadvancing() { - _message 'no arguments' -} - -_moosic_cmd_version() { - _message 'no arguments' -} - -### APPENDING COMMANDS - -_moosic_song_files() -{ - _arguments -A '-*' $main_opts $filelist_opts $auto_opts \ - '*:song file:_files' -} - -_moosic_cmd_append() { - _moosic_song_files -} - -_moosic_cmd_add() { - _moosic_song_files -} - -_moosic_cmd_pl-append() { - _moosic_song_files -} - -_moosic_cmd_pl-add() { - _moosic_song_files -} - -_moosic_cmd_prepend() { - _moosic_song_files -} - -_moosic_cmd_pl-prepend() { - _moosic_song_files -} - -_moosic_cmd_mixin() { - _moosic_song_files -} - -_moosic_cmd_pl-mixin() { - _moosic_song_files -} - -_moosic_cmd_replace() { - _moosic_song_files -} - -_moosic_cmd_pl-replace() { - _moosic_song_files -} - -_moosic_cmd_insert() { - _moosic_song_files -} - -_moosic_cmd_pl-insert() { - _moosic_song_files -} - -_moosic_cmd_putback() { - _message 'no arguments' -} - -_moosic_cmd_stagger-add() { - _moosic_song_files -} - -_moosic_cmd_stagger-merge() { - _moosic_song_files -} - -_moosic_cmd_interval-add() { - _arguments -A '-*' $main_opts $filelist_opts \ - '1:interval:' \ - '*:song file:_files' -} - -### REMOVING COMMANDS - -_moosic_cmd_cut() { - _do2 '_message' 'range' -} - -_moosic_cmd_del() { - _do2 '_message' 'range' -} - -_moosic_cmd_crop() { - _do2 '_message' 'range' -} - -_moosic_cmd_remove() { - _do2 '_message' 'regex' -} - -_moosic_cmd_filter() { - _do2 '_message' 'regex' -} - -_moosic_cmd_clear() { - _message 'no arguments' -} - -_moosic_cmd_wipe() { - _message 'no arguments' -} - -### REARRANGING COMMANDS - -_moosic_cmd_move() { - _arguments -A '-*' $main_opts \ - '1:range:' \ - '2:index:' \ - '*:no more arguments:' -} - -_moosic_cmd_move-pattern() { - _arguments -A '-*' $main_opts \ - '1:regex:' \ - '2:index:' \ - '*:no more arguments:' -} - -_moosic_cmd_swap() { - _arguments -A '-*' $main_opts \ - '1:range:' \ - '2:range:' \ - '*:no more arguments:' -} - -_moosic_cmd_shuffle() { - _arguments -A '-*' $main_opts \ - '1:range (optional):' \ - '*:no more arguments:' -} - -_moosic_cmd_reshuffle() { - _arguments -A '-*' $main_opts \ - '1:range (optional):' \ - '*:no more arguments:' -} - -_moosic_cmd_sort() { - _arguments -A '-*' $main_opts \ - '1:range (optional):' \ - '*:no more arguments:' -} - -_moosic_cmd_reverse() { - _arguments -A '-*' $main_opts \ - '1:range (optional):' \ - '*:no more arguments:' -} - -_moosic_cmd_partial-sort() { - _do2 '_message' 'regex' -} - -_moosic_cmd_stagger() { - _do2 '_message' 'regex' -} - -_moosic_cmd_sub() { - _arguments -A '-*' $main_opts \ - '1:pattern:' \ - '2:replacement:' \ - '3:range (optional):' \ - '*:no more arguments:' -} - -_moosic_cmd_suball() { - _arguments -A '-*' $main_opts \ - '1:pattern:' \ - '2:replacement:' \ - '3:range (optional):' \ - '*:no more arguments:' -} - -### GENERAL COMMANDS - -_moosic_cmd_next() { - if (( CURRENT == 2 )); then - - typeset -a display display_cmd - if zstyle -a ":completion:${curcontext}:next" \ - 'command' display_cmd; then - $display_cmd - else - display=(${(f)"$(moosic list)"}) - fi - - typeset -a numbers - numbers=({1..${#display}}) - - compadd -V songs -d display -a numbers - else - _message 'no more arguments' - fi -} - -_moosic_cmd_previous() { - _do2 '_message' 'number to skip' -} - -_moosic_cmd_goto() { - _do2 '_message' 'regex' -} - -_moosic_cmd_gobackto() { - _do2 '_message' 'regex' -} - -_moosic_cmd_noadvance() { - _message 'no arguments' -} - -_moosic_cmd_advance() { - _message 'no arguments' -} - -_moosic_cmd_toggle-advance() { - _message 'no arguments' -} - -_moosic_cmd_stop() { - _message 'no arguments' -} - -_moosic_cmd_pause() { - _message 'no arguments' -} - -_moosic_cmd_unpause() { - _message 'no arguments' -} - -_moosic_cmd_play() { - _message 'no arguments' -} - -_moosic_cmd_loop() { - _message 'no arguments' -} - -_moosic_cmd_noloop() { - _message 'no arguments' -} - -_moosic_cmd_toggle-loop() { - _message 'no arguments' -} - -_moosic_cmd_reconfigure() { - _message 'no arguments' -} - -_moosic_cmd_showconfig() { - _message 'no arguments' -} - -_moosic_cmd_start-server() { - _message 'options' -} - -_moosic_cmd_quit() { - _message 'no arguments' -} - -_moosic_cmd_exit() { - _message 'no arguments' -} - -_moosic_cmd_die() { - _message 'no arguments' -} - -_moosic "$@" diff --git a/Completion/Unix/Command/_pip b/Completion/Unix/Command/_pip index bafc7f9e9..370012d56 100644 --- a/Completion/Unix/Command/_pip +++ b/Completion/Unix/Command/_pip @@ -85,7 +85,6 @@ case $state in '--src=[check out --editable packages into given directory]: :_directories' '--ignore-requires-python[ignore the Requires-Python information]' "--no-deps[don't install package dependencies]" - '(-b --build)'{-https://cloud.kiddleb+,--build=}'[specify directory to unpack packages into]: :_directories' '--global-option=[extra global options to be supplied to the setup.py call before the install command]:options' "--no-clean[don't clean up build directories]" '--require-hashes[require a hash to check each requirement against]' diff --git a/Completion/Unix/Command/_pkg_instance b/Completion/Unix/Command/_pkg_instance deleted file mode 100644 index 3f4c49219..000000000 --- a/Completion/Unix/Command/_pkg_instance +++ /dev/null @@ -1,20 +0,0 @@ -#autoload - -local -A opts -local whicharg - -zparseopts -E -D -- '-_opts:=opts' - -whicharg=${opts#*:} - -case ${opts%:*} in -(installed) - compadd "$@" - ${opt_args[$whicharg]}/var/sadm/pkg/*/pkginfo(:h:t) - ;; -(spooled) - compadd "$@" - ${opt_args[$whicharg]}/*(:t) - ;; -(uninstalled) - compadd "$@" - ${opt_args[$whicharg]:-/var/spool/pkg}/*/pkgmap(:h:t) - ;; -esac diff --git a/Completion/Unix/Command/_pkgadd b/Completion/Unix/Command/_pkgadd deleted file mode 100644 index 7adc18a2a..000000000 --- a/Completion/Unix/Command/_pkgadd +++ /dev/null @@ -1,32 +0,0 @@ -#compdef pkgadd - -_pkgadd_pass() { - _values -S : 'password descriptor' \ - '(file env console)pass[literal password]:password:' \ - '(pass file console)env[environment variable]:environment:_parameters -g "*export*"' \ - '(pass env console)file[file]:file:_files' \ - '(pass env file)console[from /dev/tty]' -} - -_pkgadd() { - _arguments -s \ - '-d[device]:device file:_files' \ - '-x[HTTP(S) proxy]:HTTP proxy: ' \ - '-k[keystore]:keystore:_files' \ - '-P[password to decrypt keystore]:password:_pkgadd_pass' \ - '-Y[select packages by category]:category: ' \ - - set1 \ - '-n[non-interactive mode]' \ - '-v[trace all scripts]' \ - '-a[admin file]:admin file:_files' \ - "-M[don't use vfstab file]" \ - '-R[root path]:root path:_files -/' \ - '-r[response file]:response file:_files' \ - '-V[alternate vfstab file]:vfstab file:_files' \ - '*:package instance:_pkg_instance --_opts uninstalled:-d' \ - - set2 \ - '-s[spool package]:spool directory:_files -/' \ - '*:package instance:_pkg_instance --_opts uninstalled:-d' -} - -_pkgadd "$@" diff --git a/Completion/Unix/Command/_pkginfo b/Completion/Unix/Command/_pkginfo deleted file mode 100644 index eca9e057e..000000000 --- a/Completion/Unix/Command/_pkginfo +++ /dev/null @@ -1,18 +0,0 @@ -#compdef pkginfo - -_arguments -s \ - '(-q -r -x)-l[long listing]' \ - '(-l -r -x)-q[quiet mode]' \ - '(-l -q -x)-r[relocation base]' \ - '(-l -q -r)-x[extracted listing]' \ - '-c[category]:category' \ - '-a[architecture]:architecture' \ - '-v[version]:version' \ - - set1 \ - '(-p)-i[select completely installed packages]' \ - '(-i)-p[select partially installed packages]' \ - '-R[root path]:root path:_files -/' \ - '*:package instance:_pkg_instance --_opts installed:set1--R' \ - - set2 \ - '-d[device]:device file:_files' \ - '*:package instance:_pkg_instance --_opts uninstalled:set2--d' diff --git a/Completion/Unix/Command/_pkgrm b/Completion/Unix/Command/_pkgrm deleted file mode 100644 index 1191a2d1f..000000000 --- a/Completion/Unix/Command/_pkgrm +++ /dev/null @@ -1,16 +0,0 @@ -#compdef pkgrm - -_arguments -s \ - '-Y[select packages by category]:category' \ - - set1 \ - '-n[non-interactive mode]' \ - '-v[trace all scripts]' \ - '-a[admin file]:admin file:_files' \ - "-A[force removal of all files]" \ - "-M[don't use vfstab file]" \ - '-R[root path]:root path:_files -/' \ - '-V[alternate vfstab file]:vfstab file:_files' \ - '*:package instance:_pkg_instance --_opts installed:set1--R' \ - - set2 \ - '-s[spool package]:spool directory:_files -/' \ - '*:package instance:_pkg_instance --_opts spooled:set2--s' diff --git a/Completion/Unix/Command/_pump b/Completion/Unix/Command/_pump deleted file mode 100644 index 08ec026ed..000000000 --- a/Completion/Unix/Command/_pump +++ /dev/null @@ -1,24 +0,0 @@ -#compdef pump - -_arguments \ - '(-c --config-file=)'{-c,--config-file=}'[specify configuration file to use]:configuration file:_files' \ - '(-h --hostname=)'{-h,--hostname=}'[specify hostname to request]:hostname:_hosts' \ - '(-i --interface=)'{-i,--interface=}'[specify interface to configure]:interface:_net_interfaces' \ - '(-k --kill)'{-k,--kill}'[kill daemon (and disable all interfaces)]' \ - '(-l --lease=)'{-l,--lease=}'[specify lease time to request]:time (hours)' \ - '(-L --leasesecs=)'{-L,--leasesecs=}'[specify seconds to request for]:time (seconds)]' \ - '(-r --release)'{-r,--release}'[release interface]:interface:_net_interfaces' \ - '(-R --renew)'{-R,--renew}'[force immediate lease renewal]:interface:_net_interfaces' \ - '(-v --verbose)'{-v,--verbose}'[log verbose debug info]' \ - '(-s --status)'{-s,--status}'[display interface status]:interface:_net_interfaces' \ - '(-d --no-dns)'{-d,--no-dns}"[don't update resolv.conf]" \ - '(- *)'{-?,--help}'[display help information]' \ - "--no-gateway[don't set a gateway for this interface]" \ - "--no-setup[don't set up anything]" \ - "--no-resolvconf[don't set up resolvconf]" \ - '--no-bootp[ignore non-DHCP BOOTP responses]' \ - '--lookup-hostname[force lookup of hostname]' \ - '--script=[specify script to use]:script:_files' \ - "--win-client-ident[set the client identifier to match window's]" \ - '--usage[display brief usage message]' \ - ':interface:_net_interfaces' diff --git a/Completion/Unix/Command/_sudo b/Completion/Unix/Command/_sudo index 33a9d6c0c..e3b3565ef 100644 --- a/Completion/Unix/Command/_sudo +++ b/Completion/Unix/Command/_sudo @@ -1,7 +1,7 @@ #compdef sudo sudoedit local curcontext="$curcontext" environ e cmd cpp ret=1 -local -a context state line args _comp_priv_prefix +local -a context state state_descr line args _comp_priv_prefix local -A opt_args zstyle -a ":completion:${curcontext}:" environ environ @@ -41,7 +41,8 @@ args=( # # TODO: use _arguments' $opt_args to detect the cases '-u jrandom -e' and '-Ae' if [[ $service = sudoedit ]] || (( $words[(i)-e] < $words[(i)^(*sudo|-[^-]*)] )) ; then - args=( -A "-*" $args '!(-V --version -h --help)-e' '*:file:_files' ) + args+=( '!(-V --version -h --help)-e' '*: :_files' ) + _arguments -s -S -A '-?*' : $args && ret=0 else cmd="$words[1]" args+=( @@ -53,38 +54,41 @@ else '(-E -i --login -s --shell -e --edit)--preserve-env=-[preserve user environment when running command]::environment variable:_sequence _parameters -g "*export*"' \ '(-H --set-home -i --login -s --shell -e --edit)'{-H,--set-home}"[set HOME variable to target user's home dir]" \ '(-P --preserve-groups -i --login -s --shell -e --edit)'{-P,--preserve-groups}"[preserve group vector instead of setting to target's]" \ - '*:: :->normal' + '*: :->normal' ) + # sudo allows environment-variable assignments to be interspersed with + # options. this pattern represents the lax method it uses to determine whether + # an arg is an assignment + _arguments -s -S -A '(-?*|[^/=]*=*)' : $args && ret=0 fi -_arguments -s -S $args && ret=0 - if [[ $state = normal ]]; then _comp_priv_prefix=( $cmd -n ${(kv)opt_args[(I)(-[ugHEP]|--(user|group|set-home|preserve-env|preserve-groups))]} ) + + # there's no special handling for assignments with -l. they're parsed as + # normal, just ignored. we'll ignore them too if (( $+opt_args[-l] || $+opt_args[--list] )); then + CURRENT=$#line words=( "${(@)line}" ) _normal -p $service return fi - while [[ $words[1] = *=* ]]; do - if (( CURRENT == 1 )); then - compstate[parameter]="${PREFIX%%\=*}" - compset -P 1 '*=' - _value && ret=0 - return ret - fi - shift words - (( CURRENT-- )) - done - if (( CURRENT == 1 )); then + + # $line excludes words that match the -A pattern, except when it's the current + # word. so if $#line == 1 we haven't seen a command yet + if (( $#line == 1 )) && [[ $PREFIX == *=* ]]; then + compstate[parameter]="${PREFIX%%\=*}" + compset -P 1 '*=' + _value && ret=0 + elif (( $#line == 1 )); then curcontext="${curcontext%:*:*}:-command-:" _alternative \ 'commands:: _command_names -e' \ - 'options:option:(-s --shell -l --login)' \ 'parameters: :_parameters -g "*export*~*readonly*" -qS=' && ret=0 else + CURRENT=$#line words=( "${(@)line}" ) _normal && ret=0 fi fi diff --git a/Completion/Unix/Command/_tiff b/Completion/Unix/Command/_tiff index f8c4a1164..f44df0ec9 100644 --- a/Completion/Unix/Command/_tiff +++ b/Completion/Unix/Command/_tiff @@ -173,7 +173,7 @@ tiffmedian) ':output file:_files -g "*.(#i)tif(|f)(-.)"' && ret=0 ;; tiffsplit) - _arguments \ + _arguments : \ '-M+[set the memory allocation limit]:limit (MiB), 0 for unlimited' \ ':input file:_files -g "*.(#i)tif(|f)(-.)"' \ ':output file prefix' && ret=0 diff --git a/Completion/Unix/Command/_tla b/Completion/Unix/Command/_tla deleted file mode 100644 index ec7e76d44..000000000 --- a/Completion/Unix/Command/_tla +++ /dev/null @@ -1,631 +0,0 @@ -#compdef tla - -autoload -z is-at-least -local TLA=$words[1] -local tla_version -local hide_short - -# ask the user which version of tla this is -if ! zstyle -s ":completion:${curcontext}:" tla-version tla_version; then - # ask tla instead - tla_version="$($TLA --version)" - if [[ "${${(f)tla_version}[1]}" == The\ GNU\ Arch\ Revision\ Control\ System\ \(tla\)\ (#b)([0-9.]##) ]]; then - tla_version="$match[1]" - else - tla_version="${${$($TLA --version)#tla tla-}%% from regexps.com*}" - [[ $tla_version == *[a-zA-Z]* ]] && tla_version=1.3 # tla doesn't know - fi -fi - -# test whether to hide short options from completion -if zstyle -s ":completion:${curcontext}:" hide-shortopts hide_short; then - case $hide_short in - true|yes|on|1) hide_short='!' ;; - *) hide_short='' ;; - esac -fi - -# completion functions - -(( $+functions[_tla_archives] )) || -_tla_archives () { _arch_archives tla "$@" } - -(( $+functions[_tla_categories] )) || -_tla_categories () { _arch_namespace tla 1 "$argv[@]" } - -(( $+functions[_tla_branches] )) || -_tla_branches () {_arch_namespace tla 2 "$argv[@]" } - -(( $+functions[_tla_versions] )) || -_tla_versions () { _arch_namespace tla 3 "$argv[@]" } - -(( $+functions[_tla_revisions] )) || -_tla_revisions () { _arch_namespace tla 4 "$argv[@]" } - -(( $+functions[_tla_local_revisions] )) || -_tla_local_revisions () { - local expl1 expl2 tree_version=`$TLA tree-version` - _description -V applied-patches expl1 "patch from this version" - _description -V other-patches expl2 "patch from other versions" - compadd "$expl1[@]" `$TLA logs` - compadd "$expl2[@]" `$TLA logs --full $($TLA log-versions | grep -v $tree_version)` - # This is incredibly slow. - # Should complete based on -A, -R, -d -} - -(( $+functions[_tla_config] )) || -_tla_config () { - - # zsh 4.1.1+ is recommended; 4.0.6 gives the error below when doing - # tla build-config e<TAB> - # _path_files:322: no matches found: configs//e/.(/) - # whereas 4.1.1 completes correctly - - local configdir root ret=1 n expl - - n=$opt_args[(i)(-d|--dir)] - [[ -n "$n" ]] && configdir=$opt_args[$n] - root="$(_call_program tla $TLA tree-root ${configdir} 2>&1)" - if (( $? )); then - _message -e messages "Error: $root" - return $ret - fi - - if [[ -d "$root/configs" ]]; then - configdir=("$root/configs") - _description files expl 'config file' - _files -W configdir "$expl[@]" && ret=0 - else - _message -e messages "No configs/ directory in tree whose root is $root" - fi - return $ret -} - -(( $+functions[_tla_limit] )) || -_tla_limit () { #presently only does push-mirror style limits - [[ $words[$CURRENT] == *@* ]] && return 1 - - local expl archive - archive=${words[(r)*@*]:-$($TLA my-default-archive 2> /dev/null)} - if [ $archive ]; then - - if [[ $PREFIX != *--* ]]; then - _description -V categories expl "category in $archive" - compadd -q -S -- "$expl[@]" `$TLA categories -A $archive` - else - _tla_namespace_branches 3 - fi - fi -} - -(( $+functions[_tla_tree_or_rev] )) || -_tla_tree_or_rev () { - _alternative 'trees:tree:_files -/' 'revisions:revision:_tla_revisions' -} - -(( $+functions[_tla_libraries] )) || -_tla_libraries () { - local libraries expl - libraries=($(_call_program tla $TLA my-revision-library)) - _description -V libraries expl "revision library" - compadd "$expl[@]" -a libraries -} - -(( $+functions[_tla_my_revision_library] )) || -_tla_my_revision_library () { - if [[ -n $words[(r)-d] ]] || [[ -n $words[(r)--delete] ]]; then - _tla_libraries - else - _files -/ - fi -} - -(( $+functions[_tla_log_versions] )) || -_tla_log_versions () { - local logs expl - if is-at-least 1.1 $tla_version; then - logs=($(_call_program tla $TLA log-versions)) - else - logs=($(_call_program tla $TLA logs)) - fi - _description -V versions expl "log version" - compadd "$expl[@]" -a logs -} - -# command argument definitions -# commands with different versions - -local cmd_register_archive cmd_archives cmd_ls_archives cmd_redo -local cmd_redo_changes cmd_changes cmd_what_changed cmd_categories -local cmd_branches cmd_versions cmd_cacherev cmd_logs cmd_log_versions -local cmd_log_ls cmd_update cmd_join_branch cmd_replay cmd_deltapatch -local cmd_delta_patch cmd_apply_delta cmd_sync_tree cmd_make_sync_tree -local cmd_delta cmd_revdelta cmd_library_categories cmd_library_branches -local cmd_library_versions cmd_library_revisions -local cmd_archive_register - -cmd_log_ls=('*:version:_tla_log_versions') -cmd_log_versions=() -# the options should only complete items that are in the tree - -if is-at-least 1.1 $tla_version; then - cmd_register_archive=('::archive:_tla_archives' ':location:_files -/') - cmd_archive_register=($cmd_register_archive) - cmd_archives=('::regex:') - cmd_redo=('::changeset:_files -/') - cmd_changes=('::revision:_tla_revisions' - # ':separator:(--)' '*::limit:_files' - #don't understand the limit usage - ) - cmd_categories=('::archive:_tla_archives') - cmd_branches=('::category:_tla_categories') - cmd_versions=('::branch:_tla_branches') - cmd_cacherev=('::revision:_tla_revisions') - #should only complete non-cached revisions - - cmd_logs=($cmd_log_ls) - cmd_update=('::revision:_tla_revisions') - cmd_join_branch=(':revision:_tla_revisions') - #should only complete continuation revisions - - cmd_replay=('*::revision:_tla_revisions') - cmd_deltapatch=(':FROM:_tla_tree_or_rev' ':TO:_tla_tree_or_rev') - cmd_sync_tree=(':revision:_tla_revisions') - cmd_delta=(':FROM:_tla_tree_or_rev' ':TO:_tla_tree_or_rev' '::DEST:_files -/') - cmd_library_categories=('::archive:_tla_archives --library') - cmd_library_branches=('::category:_tla_categories --library') - cmd_library_versions=('::branch:_tla_branches --library') - cmd_library_revisions=('::version:_tla_versions --library') -else - cmd_register_archive=(':archive:_tla_archives' ':location:_files -/') - cmd_archives=() - cmd_redo=() - cmd_changes=('::revision:_tla_revisions') - cmd_categories=() - cmd_branches=(':category:_tla_categories') - cmd_versions=(':branch:_tla_branches') - cmd_cacherev=(':revision:_tla_revisions' '::dir:_files -/') - cmd_logs=($cmd_log_versions) - cmd_update=(':dir:_files -/' '::newdir:_files -/' - '::revision:_tla_revisions') - cmd_join_branch=(':dir:_files -/' '::newdir:_files -/' - ':revision:_tla_revisions') - cmd_replay=(':dir:_files -/' '::newdir:_files -/' '::revision:_tla_revisions') - cmd_deltapatch=(':FROM:_tla_tree_or_rev' ':TO:_tla_tree_or_rev' - ':UPON:_tla_tree_or_rev' '::DEST:_files -/') - cmd_sync_tree=(':dir:_files -/' '::newdir:_files -/' - ':revision:_tla_revisions') - cmd_delta=(':FROM:_tla_tree_or_rev' ':TO:_tla_tree_or_rev') - cmd_library_categories=() - cmd_library_branches=(':category:_tla_categories --library') - cmd_library_versions=(':branch:_tla_branches --library') - cmd_library_revisions=(':version:_tla_versions --library') -fi - -cmd_ls_archives=($cmd_archives) -cmd_redo_changes=($cmd_redo) -cmd_what_changed=($cmd_changes) -cmd_delta_patch=($cmd_deltapatch) -cmd_apply_delta=($cmd_deltapatch) -cmd_make_sync_tree=($cmd_sync_tree) -cmd_revdelta=($cmd_delta) - -# commands the same in all versions - -local cmd_help -cmd_help=() - -local cmd_my_id -cmd_my_id=('::id-string:') - -local cmd_my_default_archive -cmd_my_default_archive=('::archive:_tla_archives') - -local cmd_whereis_archive -cmd_whereis_archive=(':archive:_tla_archives') - -local cmd_init_tree -cmd_init_tree=('::version:_tla_versions') - -local cmd_tree_root -cmd_tree_root=('::directory:_files -/') - -local cmd_tree_version -cmd_tree_version=('::directory:_files -/') - -local cmd_set_tree_version -cmd_set_tree_version=(':version:_tla_versions') - -local cmd_build_config cmd_buildcfg -cmd_build_config=(':config:_tla_config') -cmd_buildcfg=($cmd_build_config) - -local cmd_cat_config cmd_catcfg cmd_cfgcat -cmd_cat_config=(':config:_tla_config') -cmd_catcfg=($cmd_cat_config) -cmd_cfgcat=($cmd_cat_config) - -local cmd_undo cmd_undo_changes -cmd_undo=('::revision:_tla_revisions') -cmd_undo_changes=($cmd_undo) - -local cmd_file_diffs -cmd_file_diffs=(':file:_files' '::revision:_tla_revisions') - -local cmd_file_find -cmd_file_find=(':file:_files' '::revision:_tla_revisions') - -local cmd_inventory cmd_srcfind -cmd_inventory=('::separator:(--)' '*:directory:_files -/') -cmd_srcfind=($cmd_inventory) - -local cmd_tree_lint cmd_lint -cmd_tree_lint=('::directory:_files -/') -cmd_lint=($cmd_tree_lint) - -local cmd_id cmd_invtag -cmd_id=('*:file:_files') -cmd_invtag=($cmd_id) - -local cmd_id_tagging_method cmd_tagging_method methods -cmd_id_tagging_method=('::tagging method:(($methods))') -methods=( - 'names:use naming conventions only' - 'implicit:use naming conventions but permit for inventory tags' - 'tagline:use naming conventions but permit for inventory tags' - 'explicit:require explicit designation of source' -) -cmd_tagging_method=($cmd_id_tagging_method) - -local cmd_add cmd_add_id cmd_add_tag -cmd_add=('*:file to add:_files') -cmd_add_id=($cmd_add) -cmd_add_tag=($cmd_add) - -local cmd_delete cmd_delete_id cmd_delete_tag -cmd_delete=('*:file to delete:_files') -cmd_delete_id=($cmd_delete) -cmd_delete_tag=($cmd_delete) - -local cmd_move cmd_move_id cmd_move_tag -cmd_move_id=(':old name:_files' ':new name:_files') -cmd_move_id=($cmd_move) -cmd_move_tag=($cmd_move) -#would be nice not to offer dirs for newname if oldname is a file, and -#vice versa - -local cmd_mv -cmd_mv=('*:file:_files') -# not really right, but close enough - -local cmd_default_id cmd_explicit_default cmd_default_tag -cmd_default_id=('::TAG-PREFIX:') -cmd_explicit_default=($cmd_default_id) -cmd_default_tag=($cmd_default_id) - -local cmd_tagging_defaults cmd_id_tagging_defaults -cmd_tagging_defaults=() -cmd_id_tagging_defaults=($cmd_tagging_defaults) - -local cmd_changeset cmd_mkpatch -cmd_changeset=( - ':ORIG:_files -/' - ':MOD:_files -/' - ':DEST:_files -/' - '*:file:_files' -) -cmd_mkpatch=("$cmd_changeset[@]") - -local cmd_dopatch cmd_do_changeset cmd_apply_changeset -cmd_dopatch=(':changeset:_files -/' ':target:_files -/') -cmd_do_changeset=($cmd_dopatch) -cmd_apply_changeset=($cmd_dopatch) - -local cmd_show_changeset -cmd_show_changeset=('::changeset:_files -/') - -local cmd_make_archive -cmd_make_archive=('::name:' ':location:_files -/') - -local cmd_archive_setup -cmd_archive_setup=('*:version:_tla_branches --trailing-dashes') - -local cmd_make_category -cmd_make_category=(':category:_tla_archives -S /') - -local cmd_make_branch -cmd_make_branch=(':branch:_tla_categories --trailing-dashes') - -local cmd_make_version -cmd_make_version=(':version:_tla_branches --trailing-dashes') - -local cmd_import cmd_imprev -cmd_import=('::version:_tla_versions') -cmd_imprev=($cmd_import) - -local cmd_commit cmd_cmtrev -cmd_commit=('::version:_tla_versions' ':separator:(--)' '*:file:_files') -cmd_cmtrev=($cmd_commit) - -local cmd_get cmd_getrev -cmd_get=(':revision:_tla_revisions' '::directory:_files -/') -cmd_getrev=($cmd_get) - -local cmd_get_patch cmd_get_changeset -cmd_get_patch=(':revision:_tla_revisions' '::dir:_files -/') -cmd_get_changeset=($cmd_get_patch) - -local cmd_lock_revision -cmd_lock_revision=(':revision:_tla_revisions') - -local cmd_push_mirror cmd_archive_mirror -cmd_push_mirror=( - '::FROM or MINE:_tla_archives' - '::TO:_tla_archives' - '::LIMIT:_tla_limit' -) -cmd_archive_mirror=($cmd_push_mirror) - -local cmd_revisions -cmd_revisions=('::version:_tla_versions') - -local cmd_ancestry -cmd_ancestry=('::revision:_tla_revisions') - -local cmd_ancestry_graph -cmd_ancestry_graph=('::revision:_tla_revisions') - -local cmd_cat_archive_log -cmd_cat_archive_log=(':revision:_tla_revisions') - -local cmd_cachedrevs -cmd_cachedrevs=(':version:_tla_versions') - -local cmd_uncacherev -cmd_uncacherev=(':revision:_tla_revisions' '::dir:_files -/') - -local cmd_archive_meta_info -cmd_archive_meta_info=(':item-name:((name\:foo mirror\:bar))') - -local cmd_archive_snapshot -cmd_archive_snapshot=(':dir:_files -/' '::limit:_tla_revisions') - -local cmd_archive_version -cmd_archive_version=() - -local cmd_archive_fixup -cmd_archive_fixup=() - -local cmd_make_log -cmd_make_log=('::version:_tla_versions') - -local cmd_add_log cmd_add_log_version -cmd_add_log=(':version:_tla_versions') -cmd_add_log_version=($cmd_add_log) - -local cmd_remove_log cmd_remove_log_version -cmd_remove_log=(':version:_tla_log_versions') -cmd_remove_log_version=($cmd_remove_log) - -local cmd_abrowse -cmd_abrowse=('::LIMIT:_tla_revisions') - -local cmd_cat_log -cmd_cat_log=(':revision-spec:_tla_local_revisions') - -local cmd_changelog -cmd_changelog=('::version:_tla_versions') - -local cmd_log_for_merge -cmd_log_for_merge=('::version:_tla_versions') - -local cmd_merges -cmd_merges=(':INTO:_tla_revisions' '::FROM:_tla_revisions') - -local cmd_new_merges -cmd_new_merges=('::version:_tla_versions') - -local cmd_tag cmd_tagrev cmd_branch -cmd_tag=(':SOURCE-REVISION:_tla_revisions' ':TAG-VERSION:_tla_versions') -cmd_tagrev=($cmd_tag) -cmd_branch=($cmd_tag) - -local cmd_star_merge -cmd_star_merge=(':FROM:_tla_revisions') - -local cmd_missing cmd_whats_missing -cmd_missing=('::revision:_tla_revisions') -cmd_whats_missing=($cmd_missing) - -local cmd_pristines cmd_ls_pristines -cmd_pristines=('::limit:_tla_revisions') -cmd_ls_pristines=($cmd_pristines) - -local cmd_lock_pristine -cmd_lock_pristine=(':revision:_tla_revisions') - -local cmd_add_pristine -cmd_add_pristine=(':revision:_tla_revisions') - -local cmd_find_pristine -cmd_find_pristine=(':revision:_tla_revisions') - -local cmd_my_revision_library cmd_library_dir -cmd_my_revision_library=(':library:_tla_my_revision_library') -cmd_library_dir=($my_revision_library) - -local cmd_library_find -cmd_library_find=(':revision:_tla_revisions --library') - -local cmd_library_add -cmd_library_add=(':revision:_tla_revisions --exclude-library-revisions') - -local cmd_library_remove -cmd_library_remove=(':revision:_tla_revisions --library') - -local cmd_library_archives -cmd_library_archives=() - -local cmd_library_log -cmd_library_log=(':revision:_tla_revisions --library') - -local cmd_library_file -cmd_library_file=(':file:_files' ':revision:_tla_revisions --library') - -local cmd_grab -cmd_grab=(':location:_files') - -local cmd_parse_package_name -cmd_parse_package_name=(':name:') - -local cmd_valid_package_name -cmd_valid_package_name=(':name:') - -local cmd_library_config -cmd_library_config=(':library:_tla_libraries') - -local cmd_rbrowse -cmd_rbrowse=('::regular expression:') - -local cmd_rm -cmd_rm=('*:file:_files') - -local cmd_escape -cmd_escape=(':string:') - -local cmd_diff -cmd_diff=('::revision:_tla_revisions') - -local cmd_export -cmd_export=(':revision:_tla_revisions' ':dir:_files -/') - -#mutually exclusive options - -local -A excludes -excludes=( -# This first line means that if --output was given, don't complete -# --no-output or --keep. The converse is not true. ---output '--no-output --keep' ---no-output --output - ---silent ' --quiet --report --verbose --debug' ---quiet '--silent --report --verbose --debug' ---report '--silent --quiet --verbose --debug' ---verbose '--silent --quiet --report --debug' ---debug '--silent --quiet --report --verbose ' - ---sparse --non-sparse ---non-sparse --sparse - ---files ' --directories --both' ---directories '--files --both' ---both '--files --directories ' - ---mirror --mirror-from ---mirror-from --mirror - ---no-cached --cached-tags ---cached-tags --no-cached - ---non-greedy --greedy ---greedy --non-greedy -) - -_tla_main () { - typeset -A opt_args - local arguments - if (( CURRENT > 2 )); then - local cmd=${words[2]} - local var_cmd=cmd_${cmd//-/_} - curcontext="${curcontext%:*:*}:tla-$cmd:" - (( CURRENT-- )) - shift words - - arguments=() - local input - input=(${${(M)${(f)"$($TLA $cmd -h)"}:# *}# }) - - local i j=1 - local short long arg desc action - short=() - long=() - arg=() - desc=() - action=() - for (( i=1 ; i <= ${#input} ; i++ )); do - [[ "$input[i]" != *[^\ ]* ]] && continue # stupid blank lines - short[j]="${${${input[i]}[1,2]}#--}" - long[j]="${${input[i]#-?, }%% *}" - - arg[j]="${${${input[i]%% *}##* }##-*}" - [[ $long[j] == --archive ]] && arg[j]=ARCHIVE # tla doesn't mention this - - desc[j]="${input[i]##* }" - if [[ "$input[i+1]" == \ *[^\ ]* ]]; then # description continues - (( i++ )) - desc[j]="$desc[j] ${input[i]##* }" - fi - [[ "$short[j]" == -[hHV] ]] && continue - desc[j]="${${desc[j]//\[/\\[}//\]/\\]}" # escape brackets - - case $arg[j] in - DIR|PATCH-DIR|DEST|OUTPUT|PATH) - action[j]='_files -/' ;; - FILES|FILE|SNAP-FILE) - action[j]='_files' ;; - MASTER|MASTER-SOURCE|ARCHIVE) - action[j]='_tla_archives' ;; - CATEGORY) - action[j]='_tla_categories' ;; - BRANCH) - action[j]='_tla_branches' ;; - VERSION) - action[j]='_tla_versions' ;; - CFG) - action[j]='_tla_configs' ;; - LIB) - action[j]='_tla_libraries' ;; -# PATCH,FILE) # not sure how to complete this -# action[j]='_tla_patch_file' ;; - *) - action[j]='' ;; - esac - - (( j++ )) - - done - - local excluded k - for (( i = 1 ; i < j ; i++ )); do - excluded=($short[i] $long[i]) - foreach opt (${=excludes[$long[i]]}) - k=$long[(i)$opt] - excluded=($excluded $short[k] $long[k]) - #excludes matching short options too :-) - end - - - # generate arguments to _arguments ;-) - # make long and short options mutually exclusive - [ $short[i] ] && arguments=("$arguments[@]" - "${hide_short}(${excluded})${short[i]}[${desc[i]}]${arg[i]:+:$arg[i]:$action[i]}") - [ $long[i] ] && arguments=("$arguments[@]" - "(${excluded})${long[i]}[${desc[i]}]${arg[i]:+:$arg[i]:$action[i]}") - done - - arguments=("$arguments[@]" "${(@P)var_cmd-*:FILE:_files}") - else - local help - local -U cmds - help=(${(f)"$($TLA help)"}) - cmds=(${${${${(M)help:#* :*}/ #: #/:}%% ##}## #}) - arguments=(':command:(($cmds))') - fi - _arguments -S -A '-*' \ - {"${hide_short}(: -)-V",'(: -)--version'}'[display version]' \ - {"${hide_short}(: -)-h",'(: -)--help'}'[display help]' \ - '(: -)-H[display verbose help]' \ - "$arguments[@]" -} - -_tla_main "$@" diff --git a/Completion/Unix/Command/_totd b/Completion/Unix/Command/_totd deleted file mode 100644 index 4d55d29bb..000000000 --- a/Completion/Unix/Command/_totd +++ /dev/null @@ -1,13 +0,0 @@ -#compdef totdconfig - -_arguments \ - - set1 \ - '-a[add totd specific options]' \ - '-D[add totd specific config into dhclient-enter-hooks]' \ - '-d:name server:_hosts' \ - '-l[configure resolv.conf]' \ - - set2 \ - '-r:config to remove:(dhcp totd resolv all)' \ - - set3 \ - '-h[help]' - diff --git a/Completion/Unix/Command/_twidge b/Completion/Unix/Command/_twidge deleted file mode 100644 index d8b3b3def..000000000 --- a/Completion/Unix/Command/_twidge +++ /dev/null @@ -1,77 +0,0 @@ -#compdef twidge -## completion for twidge 1.0.8, based on twidge(1) - -function _twidge_command { - typeset -a twidge_commands - typeset -i skip=1 - - twidge lscommands | while read cmd desc; do - if [[ $cmd == ---* ]] { - skip=0 - continue - } - if (( skip )) { - continue - } - twidge_commands+="${cmd}:${desc}" - done - - _describe command twidge_commands -} - -function _twidge_args { - typeset -a args_common args_more args_other args_update - - args_common=( - '(-a --all)'{-a,--all}'[receive all content]' - '(-e --exec)'{-e,--exec}'[execute command for each retrieved item]:command' - '(-l --long)'{-l,--long}'[long output format]' - '(-m --mailto)'{-m,--mailto}'[mail retrieved items]:mail address' - ) - - args_more=( - '(-s --saveid)'{-s,--saveid}'[save ID of most recent message]' - '(-u --unseen)'{-u,--unseen}'[only show unseen messages]' - ) - - args_other=( - '(-U --username)'{-U,--username}'[show updates of different user]:username' - ) - - args_update=( - '(-i --inreplyto)'{-i,--inreplyto}'[update in reply to a message]:message id' - '(-i --inreplyto 1)-r[read RFC2822 Mail]' - ':status' - ) - - case ${words[1]} in - lsarchive) - _arguments $args_common $args_more $args_other - ;; - ls(dm(|archive)|recent|replies|rt(|archive|replies))) - _arguments $args_common $args_more - ;; - lsfollow(ers|ing)) - _arguments $args_common :username - ;; - dmsend) - _arguments :recipient :status - ;; - (un|)follow) - _message username - ;; - update) - _arguments $args_update - ;; - esac -} - -function _twidge { - _arguments \ - '(-c --config)'{-c,--config}'[config file]:file:_files' \ - '(-d --debug)'{-d,--debug}'[enable debugging output]' \ - '(-): :_twidge_command' \ - '(-)*:: :_twidge_args' -} - -_twidge "$@" diff --git a/Completion/Unix/Command/_webbrowser b/Completion/Unix/Command/_webbrowser index e4f5fe092..17a98669a 100644 --- a/Completion/Unix/Command/_webbrowser +++ b/Completion/Unix/Command/_webbrowser @@ -1,3 +1,3 @@ -#compdef amaya arena chimera dillo dwb express galeon grail gzilla hotjava konqueror light mmm Mosaic netrik opera opera-next retawq skipstone www xmosaic zen +#compdef dillo eolie epiphany falkon konqueror ladybird netrik _alternative 'files: :_files' 'urls: :_urls' diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs index 47e60ec66..412469521 100644 --- a/Completion/Unix/Command/_zfs +++ b/Completion/Unix/Command/_zfs @@ -644,7 +644,7 @@ case $service:$words[1] in '-l[load keys for encrypted filesystems as they are being mounted]' '(-a)-R[mount filesystems along with all their children]' ) - _arguments -A "-*" -S $args \ + _arguments -A "-*" -S : $args \ '(- :)'{-j,--json}'[show all mounted file systems in JSON format]' \ '-o+[specify temporary file system options]: :_values -s , "option" {,no}{atime,dev,exec,relatime,suid,xattr} ro rw' \ '-v[report mount progress]' \ |
