fix(yay): fix completions of -Gp

This commit is contained in:
jguer committed 2021-01-31 19:07:08 +01:00
1 parent afc72daba7
commit fd9e2638f9
5 files changed
+12 -20

No files matched your search

+5 -5
View File
@@ -38,8 +38,8 @@ operations:
New operations:
yay {-Y --yay} [options] [package(s)]
yay {-P --show} [options] [package(s)]
yay {-G --getpkgbuild} [package(s)]
yay {-P --show} [options]
yay {-G --getpkgbuild} [options] [package(s)]
If no arguments are provided 'yay -Syu' will be performed
If no operation is provided -Y will be assumed
@@ -131,14 +131,14 @@ show specific options:
-g --currentconfig Print current yay configuration
-s --stats Display system package statistics
-w --news Print arch news
-p --pkgbuild Print pkgbuild of packages
yay specific options:
-c --clean Remove unneeded dependencies
--gendb Generates development package DB used for updating
getpkgbuild specific options:
-f --force Force download for existing ABS packages`)
-f --force Force download for existing ABS packages
-p --print Print pkgbuild of packages`)
}
func handleCmd(cmdArgs *settings.Arguments, dbExecutor db.Executor) error {
@@ -240,7 +240,7 @@ func handleYay(cmdArgs *settings.Arguments, dbExecutor db.Executor) error {
}
func handleGetpkgbuild(cmdArgs *settings.Arguments, dbExecutor db.Executor) error {
if cmdArgs.ExistsArg("p", "pkgbuild") {
if cmdArgs.ExistsArg("p", "print") {
return printPkgbuilds(dbExecutor, config.Runtime.HTTPClient, cmdArgs.Targets)
}
return getPkgbuilds(cmdArgs.Targets, dbExecutor, cmdArgs.ExistsArg("f", "force"))
+1 -4
View File
@@ -80,7 +80,7 @@ _yay() {
'b d h q r v')
yays=('clean gendb' 'c')
show=('complete defaultconfig currentconfig stats news' 'c d g s w')
getpkgbuild=('force pkgbuild' 'f p')
getpkgbuild=('force print' 'f p')
for o in 'D database' 'F files' 'Q query' 'R remove' 'S sync' 'U upgrade' 'Y yays' 'P show' 'G getpkgbuild'; do
_arch_incomp "$o" && break
@@ -119,9 +119,6 @@ _yay() {
G)
_yay_pkg
;;
P)
_arch_incomp 'p pkgbuild' && _yay_pkg
;;
esac
fi
true
+1 -1
View File
@@ -177,7 +177,7 @@ complete -c $progname -n "$show" -s q -l quiet -d 'Do not print news description
# Getpkgbuild options
complete -c $progname -n "$getpkgbuild" -s f -l force -d 'Force download for existing ABS packages' -f
complete -c $progname -n "$getpkgbuild" -xa "$listall"
complete -c $progname -n "$getpkgbuild" -s p -l pkgbuild -d 'Print pkgbuild of packages' -f
complete -c $progname -n "$getpkgbuild" -s p -l print -d 'Print pkgbuild of packages' -f
# Permanent configuration settings
complete -c $progname -n "not $noopt" -l save -d 'Save current arguments to yay permanent configuration' -f
+1 -6
View File
@@ -160,7 +160,7 @@ _pacman_opts_yay_modifiers=(
# -G
_pacman_opts_getpkgbuild_modifiers=(
{-f,--force}'[Force download for existing ABS packages]'
{-p,--pkgbuild}'[Print PKGBUILDs]:package:_pacman_completions_all_packages'
{-p,--print}'[Print PKGBUILDs]:package:_pacman_completions_all_packages'
)
# -P
@@ -508,11 +508,6 @@ _pacman_zsh_comp() {
Q*)
_pacman_action_query
;;
P*p*)
_arguments -s : \
"$_pacman_opts_print_modifiers[@]" \
"*:package:_pacman_all_packages"
;;
P*)
_arguments -s : \
"$_pacman_opts_print_modifiers[@]"
+4 -4
View File
@@ -124,10 +124,6 @@ Print new news from the Archlinux homepage. News is considered new if it is
newer than the build date of all native packages. Pass this twice to show all
available news.
.TP
.B \-p, \-\-pkgbuild
Prints the PKGBUILD of the given packages to stdout.
.TP
.B \-q, \-\-quiet
Only show titles when printing news.
@@ -138,6 +134,10 @@ Only show titles when printing news.
Force download for ABS packages that already exist in the current directory. This
ensures directories are not accidentally overwritten.
.TP
.B \-p, \-\-print
Prints the PKGBUILD of the given packages to stdout.
.SH PERMANENT CONFIGURATION SETTINGS
.TP
.B \-\-save