fix(zsh): fix zsh completion for yay specific flags (#1893)

This commit is contained in:
Balki 2023-01-13 13:50:09 +00:00 committed by GitHub
parent c40e949752
commit e09209bb19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
#compdef yay #compdef yay
# vim:fdm=marker foldlevel=0 tabstop=2 shiftwidth=2 filetype=zsh # vim:tabstop=2 shiftwidth=2 filetype=zsh
typeset -A opt_args typeset -A opt_args
setopt extendedglob setopt extendedglob
@ -512,18 +512,17 @@ _pacman_zsh_comp() {
"$_pacman_opts_query_modifiers[@]" \ "$_pacman_opts_query_modifiers[@]" \
'*:package file:_files -g "*.pkg.tar*~*.sig(.,@)"' '*:package file:_files -g "*.pkg.tar*~*.sig(.,@)"'
;; ;;
T*)
_pacman_action_deptest
;;
Q*) Q*)
_pacman_action_query _pacman_action_query
;; ;;
P*) P*)
_arguments -s : \ _arguments -s : \
'-P' \
"$_pacman_opts_print_modifiers[@]" "$_pacman_opts_print_modifiers[@]"
;; ;;
W*) W*)
_arguments -s : \ _arguments -s : \
'-W' \
"$_pacman_opts_web_modifiers[@]" "$_pacman_opts_web_modifiers[@]"
;; ;;
R*) R*)
@ -556,10 +555,7 @@ _pacman_zsh_comp() {
_pacman_action_sync _pacman_action_sync
;; ;;
T*) T*)
_arguments -s : \ _pacman_action_deptest
'-T' \
"$_pacman_opts_common[@]" \
":packages:_pacman_all_packages"
;; ;;
U*) U*)
_pacman_action_upgrade _pacman_action_upgrade
@ -569,10 +565,12 @@ _pacman_zsh_comp() {
;; ;;
Y*) Y*)
_arguments -s : \ _arguments -s : \
'-Y' \
"$_pacman_opts_yay_modifiers[@]" "$_pacman_opts_yay_modifiers[@]"
;; ;;
G*) G*)
_arguments -s : \ _arguments -s : \
'-G' \
"$_pacman_opts_getpkgbuild_modifiers[@]" "$_pacman_opts_getpkgbuild_modifiers[@]"
;; ;;