summaryrefslogtreecommitdiffstats
path: root/contrib/zsh_completion
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/zsh_completion')
-rw-r--r--contrib/zsh_completion16
1 files changed, 4 insertions, 12 deletions
diff --git a/contrib/zsh_completion b/contrib/zsh_completion
index d7e14864..07cd422e 100644
--- a/contrib/zsh_completion
+++ b/contrib/zsh_completion
@@ -7,7 +7,6 @@ typeset -A opt_args
# options for passing to _arguments: main pacman commands
_pacman_opts_commands=(
'-A[Add a package to the system]'
- '-F[Upgrade an installed package]'
'-Q[Query the package database]'
'-R[Remove a package from the system]'
'-S[Synchronize packages]'
@@ -26,7 +25,7 @@ _pacman_opts_common=(
'--noconfirm[Do not ask for confirmation]'
)
-# options for passing to _arguments: options for --add, --freshen and --update commands
+# options for passing to _arguments: options for --add, and --update commands
_pacman_opts_pkgfile=(
'-d[Skip dependency checks]'
'-f[Overwrite conflicting files]'
@@ -76,6 +75,7 @@ _pacman_opts_sync_modifiers=(
'-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'
)
# handles --action subcommand
@@ -85,13 +85,6 @@ _pacman_action_add() {
"$_pacman_opts_pkgfile[@]"
}
-# handles --freshen subcommand
-_pacman_action_freshen() {
- _arguments -s : \
- "$_pacman_opts_common[@]" \
- "$_pacman_opts_pkgfile[@]"
-}
-
# handles --help subcommand
_pacman_action_help() {
_arguments -s : \
@@ -227,9 +220,9 @@ _pacman_completions_all_packages() {
repositories=( $(_call_program repositories cat /etc/pacman.conf | grep "^\[" | sed "s,\(\[\|\]\),,g" | grep -v "^options" | sort -u) )
# these can be specified as either 'package' or 'repository/package'
if [[ "$PREFIX" == "" ]] ; then
- packages=( $(_call_program packages ls /var/lib/pacman/${^repositories} | grep -v "^/" | sed "s,\-[^-]*\-[^-]*$,," | sort -u) )
+ packages=( $(_call_program packages ls /var/lib/pacman/sync/${^repositories} | grep -v "^/" | sed "s,\-[^-]*\-[^-]*$,," | sort -u) )
else
- packages=( $(_call_program packages ls /var/lib/pacman/${^repositories} | grep -v "^/" | grep -e \^$PREFIX | sed "s,\-[^-]*\-[^-]*$,," | sort -u) )
+ packages=( $(_call_program packages ls /var/lib/pacman/sync/${^repositories} | grep -v "^/" | grep -e \^$PREFIX | sed "s,\-[^-]*\-[^-]*$,," | sort -u) )
fi
compadd "$@" -a packages
}
@@ -274,7 +267,6 @@ _pacman_get_command() {
_pacman() {
case $words[2] in
-A*) _pacman_action_add ;;
- -F*) _pacman_action_freshen ;;
-Qg) # ipkg groups
_arguments -s : \
"$_pacman_opts_common[@]" \