Add completions for --news

This commit is contained in:
Jonas Thiem 2018-05-06 03:31:09 +02:00
parent 8dd08327b1
commit 976876961b
4 changed files with 5 additions and 2 deletions

1
cmd.go
View file

@ -91,6 +91,7 @@ Print specific options:
-n --numberupgrades Print number of updates
-s --stats Display system package statistics
-u --upgrades Print update list
-w --news Print arch news
Yay specific options:
-c --clean Remove unneeded dependencies

View file

@ -65,8 +65,8 @@ _yay() {
'c g i l p s u w y')
upgrade=('asdeps asexplicit force needed nodeps assume-installed print recursive' 'p')
yays=('clean gendb' 'c')
print=('complete defaultconfig config numberupgrades stats upgrades' 'c d g n
s u')
print=('complete defaultconfig config numberupgrades stats upgrades news' 'c d g n
s u w')
common=('arch cachedir color config confirm dbpath debug gpgdir help hookdir logfile
noconfirm noprogressbar noscriptlet quiet save mflags buildir editor
makepkg pacman tar git gpg gpgflags config requestsplitn sudoloop nosudoloop

View file

@ -108,6 +108,7 @@ complete -c $progname -n $print -s d -l defaultconfig -d 'Print current yay conf
complete -c $progname -n $print -s n -l numberupgrades -d 'Print number of updates' -f
complete -c $progname -n $print -s s -l stats -d 'Display system package statistics' -f
complete -c $progname -n $print -s u -l upgrades -d 'Print update list' -f
complete -c $progname -n $print -s w -l news -d 'Print arch news'
# Transaction options (sync, remove, upgrade)
for condition in sync remove upgrade

View file

@ -134,6 +134,7 @@ _pacman_opts_print_modifiers=(
{-n,--numberupgrades}'[Print number of updates]'
{-s,--stats}'[Display system package statistics]'
{-u,--upgrades}'[Print update list]'
{-w,--news}'[Print arch news]'
)
# options for passing to _arguments: options for --remove command
_pacman_opts_remove=(