From fc3738c0602c5c01f377c0a2735079cae656fa98 Mon Sep 17 00:00:00 2001 From: Jguer Date: Sun, 4 Mar 2018 00:12:19 +0000 Subject: [PATCH] add missing options and operations to zsh Signed-off-by: Jguer --- parser.go | 4 ++-- zsh-completion | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/parser.go b/parser.go index 26803f9d..fba8c583 100644 --- a/parser.go +++ b/parser.go @@ -7,8 +7,8 @@ import ( "strings" ) -// A basic set implementation for strings. -// This is used a lot so it deserves its own type. +// A basic set implementation for strings. +// This is used a lot so it deserves its own type. // Other types of sets are used throughout the code but do not have // their own typedef. // String sets and sets should be used throughout the code when applicable, diff --git a/zsh-completion b/zsh-completion index 5c9fbd8d..474b27fb 100644 --- a/zsh-completion +++ b/zsh-completion @@ -10,9 +10,11 @@ _pacman_opts_commands=( {-G,--getpkgbuild}'[Get PKGBUILD from ABS or AUR]' {-Q,--query}'[Query the package database]' {-R,--remove}'[Remove a package from the system]' + {-P,--print}'[Print yay information]' {-S,--sync}'[Synchronize packages]' {-T,--deptest}'[Check if dependencies are installed]' {-U,--upgrade}'[Upgrade a package]' + {-Y,--yay}'[Yay specific options]' {-V,--version}'[Display version and exit]' '(-h --help)'{-h,--help}'[Display usage]' ) @@ -37,6 +39,12 @@ _pacman_opts_common=( '--noscriptlet[Do not execute the install scriptlet if one exists]' '--bottomup[Show AUR packages first]' '--topdown[Show repository packages first]' + '--devel[Check -git/-svn/-hg development version]' + '--nodevel[Disable development version checking]' + '--afterclean[Clean package sources after successful build]' + '--noafterclean[Disable package sources cleaning after successful build]' + '--timeupdate[Check packages modification date and version]' + '--notimeupdate[Check only package version change]' ) # options for passing to _arguments: options for --upgrade commands @@ -80,6 +88,10 @@ _pacman_opts_query_modifiers=( {-u,--upgrades}'[List packages that can be upgraded]' ) +_pacman_opts_yay_modifiers=( + {-c,--clean}'[Remove unneeded dependencies]' + '--gendb[Generates development package DB used for updating]' +) # options for passing to _arguments: options for --remove command _pacman_opts_remove=( {-c,--cascade}'[Remove all dependent packages]' @@ -458,6 +470,10 @@ _pacman_zsh_comp() { V*) _pacman_action_version ;; + Y*) + "$_pacman_opts_common[@]" \ + "$_pacman_opts_sync_modifiers[@]" + ;; *) case ${(M)words:#--*} in