diff options
| author | dana <dana@dana.is> | 2026-06-30 19:19:13 -0500 |
|---|---|---|
| committer | dana <dana@dana.is> | 2026-07-03 07:02:41 -0500 |
| commit | b39c9fa22dd59879acaf3da30e0a905c03ae2782 (patch) | |
| tree | 9a6a4614a129e618544f26abd40ca041ee3b03aa /Completion/Unix/Command | |
| parent | 54889: comparguments: always parse optargs as optargs (diff) | |
| download | zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.gz zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.bz2 zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.lz zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.xz zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.zst zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.zip | |
54891: completion: remove obsolete functions
Diffstat (limited to 'Completion/Unix/Command')
| -rw-r--r-- | Completion/Unix/Command/_aap | 50 | ||||
| -rw-r--r-- | Completion/Unix/Command/_baz | 585 | ||||
| -rw-r--r-- | Completion/Unix/Command/_bittorrent | 100 | ||||
| -rw-r--r-- | Completion/Unix/Command/_clay | 42 | ||||
| -rw-r--r-- | Completion/Unix/Command/_cplay | 8 | ||||
| -rw-r--r-- | Completion/Unix/Command/_fsh | 22 | ||||
| -rw-r--r-- | Completion/Unix/Command/_initctl | 184 | ||||
| -rw-r--r-- | Completion/Unix/Command/_monotone | 43 | ||||
| -rw-r--r-- | Completion/Unix/Command/_moosic | 487 | ||||
| -rw-r--r-- | Completion/Unix/Command/_pump | 24 | ||||
| -rw-r--r-- | Completion/Unix/Command/_tla | 631 | ||||
| -rw-r--r-- | Completion/Unix/Command/_totd | 13 | ||||
| -rw-r--r-- | Completion/Unix/Command/_twidge | 77 |
13 files changed, 0 insertions, 2266 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/_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/_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/_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/_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/_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 "$@" |
