Browse Source

Merge pull request #521 from Morganamilo/nativecompletion

Add bash and zsh completion for new flags
Anna 6 years ago
parent
commit
3406575f9d
3 changed files with 7 additions and 2 deletions
  1. 1 1
      cmd.go
  2. 2 1
      completions/bash
  3. 4 0
      completions/zsh

+ 1 - 1
cmd.go

@@ -94,7 +94,7 @@ Permanent configuration options:
     --noprovides          Just look for packages by pkgname
     --pgpfetch            Prompt to import PGP keys from PKGBUILDs
     --nopgpfetch          Don't prompt to import PGP keys
-    --useask              Automatically resolce conflicts using pacman's ask flag
+    --useask              Automatically resolve conflicts using pacman's ask flag
     --nouseask            Confirm conflicts manually during the install
     --combinedupgrade     Refresh then perform the repo and AUR upgrade together
     --nocombinedupgrade   Perform the repo upgrade and AUR upgrade separately

+ 2 - 1
completions/bash

@@ -77,7 +77,8 @@ _yay() {
            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')
+           useask nouseask combinedupgrade nocombinedupgrade 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

+ 4 - 0
completions/zsh

@@ -86,6 +86,10 @@ _pacman_opts_common=(
   '--noprovides[Just look for packages by pkgname]'
   '--pgpfetch[Prompt to import PGP keys from PKGBUILDs]'
   "--nopgpfetch[Don't prompt to import PGP keys]"
+  "--useask[Automatically resolve conflicts using pacman's ask flag]"
+  '--nouseask[Confirm conflicts manually during the install]'
+  '--combinedupgrade[Refresh then perform the repo and AUR upgrade together]'
+  '--nocombinedupgrade[Perform the repo upgrade and AUR upgrade separately]'
   '--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'