diff options
author | Clint Adams <clint@users.sourceforge.net> | 2005-04-16 20:24:48 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2005-04-16 20:24:48 +0000 |
commit | de553ca7db878dfb94cce02a1a9190a7c735a6b0 (patch) | |
tree | 0fa06cd24d661624624e11036710a9f83b367ab1 /Completion/Unix/Type/_arch_archives | |
parent | f82136ac94a7bc9e2d50223bbccd04a307a5a6d2 (diff) | |
download | zsh-de553ca7db878dfb94cce02a1a9190a7c735a6b0.tar.gz zsh-de553ca7db878dfb94cce02a1a9190a7c735a6b0.tar.xz zsh-de553ca7db878dfb94cce02a1a9190a7c735a6b0.zip |
* 21147: factor out some common code from _tla and _baz, and fix some
breakage from 21075.
Diffstat (limited to 'Completion/Unix/Type/_arch_archives')
-rw-r--r-- | Completion/Unix/Type/_arch_archives | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Completion/Unix/Type/_arch_archives b/Completion/Unix/Type/_arch_archives new file mode 100644 index 000000000..9ffd7e3d3 --- /dev/null +++ b/Completion/Unix/Type/_arch_archives @@ -0,0 +1,14 @@ +#autoload + +local ARCHCMD="$1" +shift +local expl completions library name_arg='-n' +if [[ -n $argv[(r)--library] ]]; then + library='library-' + # remove parameter from $@ before calling compadd + argv[(r)--library]=() + name_arg= +fi +completions=($(_call_program ${ARCHCMD} ${ARCHCMD} ${library:-}archives $name_arg)) +_description -V archives expl "${library:-}archives" +compadd "$@" "$expl[@]" -- "$completions[@]" |