Merge pull request #488 from Morganamilo/comp

Update bash and zsh completion
This commit is contained in:
Anna 2018-06-12 21:36:10 +01:00 committed by GitHub
commit 1002a4f5e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 5 deletions

2
cmd.go
View File

@ -58,7 +58,7 @@ Permanent configuration options:
--requestsplitn <n> Max amount of packages to query per AUR request
--sortby <field> Sort AUR results by a specific field during search
--answerclean <a> Set a predetermined answer for the clean build menu
--answerdiff <a> Set a predetermined answer for the diff menu
--answerdiff <a> Set a predetermined answer for the diff menu
--answeredit <a> Set a predetermined answer for the edit pkgbuild menu
--answerupgrade <a> Set a predetermined answer for the upgrade menu
--noanswerclean Unset the answer for the clean build menu

View File

@ -51,6 +51,9 @@ _pacman_pkg() {
)"
}
_yay() {
local common core cur database prev query remove sync upgrade yays print o
COMPREPLY=()
@ -71,8 +74,10 @@ _yay() {
noconfirm noprogressbar noscriptlet quiet save mflags buildir editor
makepkg pacman tar git gpg gpgflags config requestsplitn sudoloop nosudoloop
redownload noredownload redownloadall rebuild rebuildall rebuildtree norebuild
sortby answerclean answeredit answerupgrade noanswerclean noansweredit
noanswerupgrade root verbose' 'b d h q r v')
sortby answerclean answerdiff answeredit answerupgrade noanswerclean noanswerdiff
noansweredit noanswerupgrade cleanmenu diffmenu editmenu upgrademenu
nocleanmenu nodiffmenu noupgrademenu provides noprovides pgpfetch nopgpfetch
root verbose aur repo' 'a b d h q r v')
core=('database files help query remove sync upgrade version' 'D F Q R S U V h')
for o in 'D database' 'F files' 'Q query' 'R remove' 'S sync' 'U upgrade' 'Y yays' 'P print'; do

View File

@ -22,6 +22,9 @@ _pacman_opts_commands=(
# options for passing to _arguments: options common to all commands
_pacman_opts_common=(
'--repo[Assume targets are from the repositories]'
{-a,--aur}'[Assume targets are from the AUR]'
'--arch[Set an alternate architecture]'
{-b,--dbpath}'[Alternate database location]:database_location:_files -/'
'--color[colorize the output]:color options:(always never auto)'
@ -52,11 +55,18 @@ _pacman_opts_common=(
'--sortby[Sort AUR results by a specific field during search]:sortby options:(votes popularity id baseid name base submitted modified)'
'--answerclean[Set a predetermined answer for the clean build menu]:answer'
'--answeredit[Set a predetermined answer for the edit pkgbuild menu]:answer'
'--answerupgrade[Set a predetermined answer for the upgrade menu]:answe'
'--answerupgrade[Set a predetermined answer for the upgrade menu]:answer'
'--noanswerclean[Unset the answer for the clean build menu]'
'--noansweredit[Unset the answer for the edit pkgbuild menu]'
'--noanswerupgrade[Unset the answer for the upgrade menu]'
'--cleanmenu[Give the option to clean build PKGBUILDS]'
'--diffmenu[Give the option to show diffs for build files]'
'--editmenu[Give the option to edit/view PKGBUILDS]'
'--upgrademenu[Show a detailed list of updates with the option to skip any]'
"--nocleanmenu[Don't clean build PKGBUILDS]"
"--nodiffmenu[Don't show diffs for build files]"
"--noeditmenu[Don't edit/view PKGBUILDS]"
"--noupgrademenu[Don't show the upgrade menu]"
'--bottomup[Show AUR packages first]'
'--topdown[Show repository packages first]'
@ -71,6 +81,10 @@ _pacman_opts_common=(
'--noredownload[Skip pkgbuild download if in cache and up to date]'
'--rebuild[Always build target packages]'
'--rebuildall[Always build all AUR packages]'
'--provides[Look for matching provders when searching for packages]'
'--noprovides[Just look for packages by pkgname]'
'--pgpfetch[Prompt to import PGP keys from PKGBUILDs]'
"--nopgpfetch[Don't prompt to import PGP keys]"
'--rebuildtree[Always build all AUR packages even if installed]'
'--norebuild[Skip package build if in cache and up to date]'
'--mflags[Pass arguments to makepkg]:mflags'