mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
zsh completion: make $tmp local
The tmp variable is conflicting with the $tmp variable in ${^fpath}/_main_complete(N) and which is used to complete all the functions, and causing an error: command not found: for whatever was in $tmp (which in this case is the last value in $words[@]) making it local fixes this. Signed-off-by: Daniel Wallace <danielwallace@gtmanfred.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
3eee3d67af
commit
cd6ca88c49
@ -118,7 +118,6 @@ _pacman_action_help() {
|
||||
_pacman_action_none() {
|
||||
_arguments -s : \
|
||||
"$_pacman_opts_commands[@]"
|
||||
return 0
|
||||
}
|
||||
|
||||
# handles --query subcommand
|
||||
@ -320,6 +319,7 @@ _pacman_get_command() {
|
||||
# main dispatcher
|
||||
_pacman_zsh_comp() {
|
||||
local -a args cmds;
|
||||
local tmp
|
||||
args=( ${${${(M)words:#-*}#-}:#-*} )
|
||||
for tmp in $words; do
|
||||
cmds+=("${${_pacman_opts_commands[(r)*$tmp\[*]%%\[*}#*\)}")
|
||||
@ -434,7 +434,6 @@ _pacman_zsh_comp() {
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
_key_shortopts=(
|
||||
|
Loading…
Reference in New Issue
Block a user