瀏覽代碼

Merge pull request #521 from Morganamilo/nativecompletion

Add bash and zsh completion for new flags
Anna 6 年之前
父節點
當前提交
3406575f9d
共有 3 個文件被更改,包括 7 次插入2 次删除
  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
     --noprovides          Just look for packages by pkgname
     --pgpfetch            Prompt to import PGP keys from PKGBUILDs
     --pgpfetch            Prompt to import PGP keys from PKGBUILDs
     --nopgpfetch          Don't prompt to import PGP keys
     --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
     --nouseask            Confirm conflicts manually during the install
     --combinedupgrade     Refresh then perform the repo and AUR upgrade together
     --combinedupgrade     Refresh then perform the repo and AUR upgrade together
     --nocombinedupgrade   Perform the repo upgrade and AUR upgrade separately
     --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
            sortby answerclean answerdiff answeredit answerupgrade noanswerclean noanswerdiff
            noansweredit noanswerupgrade cleanmenu diffmenu editmenu upgrademenu
            noansweredit noanswerupgrade cleanmenu diffmenu editmenu upgrademenu
            nocleanmenu nodiffmenu noupgrademenu provides noprovides pgpfetch nopgpfetch
            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')
   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

+ 4 - 0
completions/zsh

@@ -86,6 +86,10 @@ _pacman_opts_common=(
   '--noprovides[Just look for packages by pkgname]'
   '--noprovides[Just look for packages by pkgname]'
   '--pgpfetch[Prompt to import PGP keys from PKGBUILDs]'
   '--pgpfetch[Prompt to import PGP keys from PKGBUILDs]'
   "--nopgpfetch[Don't prompt to import PGP keys]"
   "--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]'
   '--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'