diff options
-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 |