Browse Source

Merge pull request #488 from Morganamilo/comp

Update bash and zsh completion
Anna 6 years ago
parent
commit
1002a4f5e5
3 changed files with 24 additions and 5 deletions
  1. 1 1
      cmd.go
  2. 7 2
      completions/bash
  3. 16 2
      completions/zsh

+ 1 - 1
cmd.go

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

+ 7 - 2
completions/bash

@@ -51,6 +51,9 @@ _pacman_pkg() {
   )"
   )"
 }
 }
 
 
+
+
+
 _yay() {
 _yay() {
   local common core cur database prev query remove sync upgrade yays print o
   local common core cur database prev query remove sync upgrade yays print o
   COMPREPLY=()
   COMPREPLY=()
@@ -71,8 +74,10 @@ _yay() {
            noconfirm noprogressbar noscriptlet quiet save mflags buildir editor
            noconfirm noprogressbar noscriptlet quiet save mflags buildir editor
            makepkg pacman tar git gpg gpgflags config requestsplitn sudoloop nosudoloop
            makepkg pacman tar git gpg gpgflags config requestsplitn sudoloop nosudoloop
            redownload noredownload redownloadall rebuild rebuildall rebuildtree norebuild
            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')
   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
   for o in 'D database' 'F files' 'Q query' 'R remove' 'S sync' 'U upgrade' 'Y yays' 'P print'; do

+ 16 - 2
completions/zsh

@@ -22,6 +22,9 @@ _pacman_opts_commands=(
 
 
 # options for passing to _arguments: options common to all commands
 # options for passing to _arguments: options common to all commands
 _pacman_opts_common=(
 _pacman_opts_common=(
+  '--repo[Assume targets are from the repositories]'
+  {-a,--aur}'[Assume targets are from the AUR]'
+
   '--arch[Set an alternate architecture]'
   '--arch[Set an alternate architecture]'
   {-b,--dbpath}'[Alternate database location]:database_location:_files -/'
   {-b,--dbpath}'[Alternate database location]:database_location:_files -/'
   '--color[colorize the output]:color options:(always never auto)'
   '--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)'
   '--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'
   '--answerclean[Set a predetermined answer for the clean build menu]:answer'
   '--answeredit[Set a predetermined answer for the edit pkgbuild 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]'
   '--noanswerclean[Unset the answer for the clean build menu]'
   '--noansweredit[Unset the answer for the edit pkgbuild menu]'
   '--noansweredit[Unset the answer for the edit pkgbuild menu]'
   '--noanswerupgrade[Unset the answer for the upgrade 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]'
   '--bottomup[Show AUR packages first]'
   '--topdown[Show repository 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]'
   '--noredownload[Skip pkgbuild download if in cache and up to date]'
   '--rebuild[Always build target packages]'
   '--rebuild[Always build target packages]'
   '--rebuildall[Always build all AUR 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]'
   '--rebuildtree[Always build all AUR packages even if installed]'
   '--norebuild[Skip package build if in cache and up to date]'
   '--norebuild[Skip package build if in cache and up to date]'
   '--mflags[Pass arguments to makepkg]:mflags'
   '--mflags[Pass arguments to makepkg]:mflags'