summaryrefslogtreecommitdiffstats
path: root/contrib/zsh_completion
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2008-01-13 16:46:42 +0100
committerDan McGee <dan@archlinux.org>2008-01-13 19:21:36 +0100
commit78e7342c1625f9cba399b89ab58a20599ae12c5a (patch)
treefb4de31a81c4ca8ac71973e6af4953f3813afa8d /contrib/zsh_completion
parentab506f77c04a481782d9e53c6a285227f58f5cf7 (diff)
downloadpacman-78e7342c1625f9cba399b89ab58a20599ae12c5a.tar.gz
pacman-78e7342c1625f9cba399b89ab58a20599ae12c5a.tar.xz
zsh_completion : minor fixes.
-Qg was handled twice. --ignore completed on all installed packages instead of all packages. --ignoregroup had a special handling that seems unnecessary. It wasn't done for --ignore, and it apparently works fine without anyway. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Diffstat (limited to 'contrib/zsh_completion')
-rw-r--r--contrib/zsh_completion20
1 files changed, 5 insertions, 15 deletions
diff --git a/contrib/zsh_completion b/contrib/zsh_completion
index 5ea6c33b..8dec06df 100644
--- a/contrib/zsh_completion
+++ b/contrib/zsh_completion
@@ -49,7 +49,6 @@ _pacman_opts_query_modifiers=(
'-c[List package changelog]'
'-d[List packages installed as dependencies]'
'-e[List packages explicitly installed]'
- '-g[List all members of a package group]'
'-i[View package information]'
'-ii[View package information including backup files]'
'-l[List package contents]'
@@ -87,8 +86,10 @@ _pacman_opts_sync_modifiers=(
'-u[Upgrade all out-of-date packages]'
'-w[Download packages only]'
'-y[Download fresh package databases]'
- '*--ignore[Ignore a package upgrade]:package:_pacman_completions_installed_packages'
- '*--ignoregroup[Ignore a group upgrade]:package group:_pacman_completions_all_groups'
+ '*--ignore[Ignore a package upgrade]:package:
+ _pacman_completions_all_packages'
+ '*--ignoregroup[Ignore a group upgrade]:package group:
+ _pacman_completions_all_groups'
'--asdeps[Install packages as non-explicitly installed]'
)
@@ -288,17 +289,6 @@ _pacman_get_command() {
# main dispatcher
_pacman() {
- # First check if --ignoregroup was the last command given. If so, complete
- # all groups.
- if [ "$words[-2]" = "--ignoregroup" ]; then
- _arguments -s : \
- "$_pacman_opts_common[@]" \
- "$_pacman_opts_sync_modifiers[@]" \
- '*:package group:_pacman_completions_all_groups'
- return 0
- fi
-
- # Otherwise, complete on the given command.
case $words[2] in
-A*) _pacman_action_add ;;
-Q*g*) # ipkg groups
@@ -307,7 +297,7 @@ _pacman() {
"$_pacman_opts_query_modifiers[@]" \
'*:groups:_pacman_completions_installed_groups'
;;
- -Q*o*) # file *.pkg.tar.gz
+ -Q*o*) # file
_arguments -s : \
"$_pacman_opts_common[@]" \
"$_pacman_opts_query_modifiers[@]" \