diff options
author | Clint Adams <clint@users.sourceforge.net> | 2001-05-28 19:06:50 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2001-05-28 19:06:50 +0000 |
commit | aa76e74a05367ad4c0256c540733e2fe908cd7c3 (patch) | |
tree | 8186fe89ed5c503cb480528b707464d6cdfe672e | |
parent | 661857b1619f0e1381e4b3337042c3467f7070f6 (diff) | |
download | zsh-aa76e74a05367ad4c0256c540733e2fe908cd7c3.tar.gz zsh-aa76e74a05367ad4c0256c540733e2fe908cd7c3.tar.xz zsh-aa76e74a05367ad4c0256c540733e2fe908cd7c3.zip |
14513: update-alternatives completion
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/Debian/Command/.distfiles | 1 | ||||
-rw-r--r-- | Completion/Debian/Command/_update-alternatives | 41 |
3 files changed, 46 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index b96f7c21b..9c7f5d40f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-05-28 Clint Adams <schizo@debian.org> + * 14513: Completion/Debian/Command/.distfiles, + Completion/Debian/Command/_update_alternatives: + completion for update-alternatives + * 14512: Completion/Debian/Command/_dpkg: tweak --compare-versions behavior. diff --git a/Completion/Debian/Command/.distfiles b/Completion/Debian/Command/.distfiles index a45d022f7..d4660841e 100644 --- a/Completion/Debian/Command/.distfiles +++ b/Completion/Debian/Command/.distfiles @@ -1,4 +1,5 @@ DISTFILES_SRC=' .distfiles _apt _bug _dpkg _dpkg_source _dupload +_update_alternatives ' diff --git a/Completion/Debian/Command/_update-alternatives b/Completion/Debian/Command/_update-alternatives new file mode 100644 index 000000000..2f5c5fe47 --- /dev/null +++ b/Completion/Debian/Command/_update-alternatives @@ -0,0 +1,41 @@ +#compdef update-alternatives + +local curcontext="$curcontext" context state line expl ret +typeset -A opt_args + +_arguments -C '--verbose' \ + '--quiet' \ + '--test' \ + '--help' \ + '--version' \ + '--altdir:altdir:_files -/' \ + '--admindir:admindir:_files -/' \ + '--install:*::alt:->install' \ + '--remove:*::alt:->remove' \ + '--auto:altname:_files -W /var/lib/dpkg/alternatives' \ + '--display:altname:_files -W /var/lib/dpkg/alternatives' \ + '--config:altname:_files -W /var/lib/dpkg/alternatives' && return 0 + +_call_function ret _update_alternatives_$state && return ret +case "$state" in + islave) + _arguments -C '1:link:_files' \ + '2:name:_files -W /var/lib/dpkg/alternatives' \ + '3:path:_files' \ + '--slave:*::slave:->islave' + ;; + install) + _arguments -C '1:link:_files' \ + '2:name:_files -W /var/lib/dpkg/alternatives' \ + '3:path:_files' \ + '4:priority:' \ + '--slave:*::slave:->islave' \ + ;; + + remove) + _arguments \ + '1:altname:_files -W /var/lib/dpkg/alternatives' \ + '2:path:_files' + ;; + +esac |