1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-07-24 21:11:02 +02:00

users/26649: add zstyle for rake targets without description

`rake -T` shows only these targets having a description. But it might be
useful to see all. Allow this with the zsytle setting:

zstyle :completion::complete:rake:argument-rest:targets extended true
This commit is contained in:
Jörg Sommer 2020-12-15 22:32:46 +01:00 committed by Oliver Kiddle
parent 61e4e43ac9
commit 93b4ee524d
2 changed files with 6 additions and 1 deletions
ChangeLog
Completion/Unix/Command

View file

@ -1,5 +1,8 @@
2021-05-16 Oliver Kiddle <opk@zsh.org>
* Jörg Sommer: users/26649: Completion/Unix/Command/_rake:
add zstyle for rake targets without description
* 48783: Completion/Unix/Command/_ansible: update ansible
completion to 2.10.8

View file

@ -37,7 +37,9 @@ case "$state" in
;;
target)
local -a targets
targets=( ${${(f)"$(_call_program targets $words[1] -sT $opt_args[(I)(-N|--nosearch)] ${(kv)opt_args[(I)(-f|--rakefile)]} 2>/dev/null)"}/(#b)rake ([^ ]##) ##\# (*)/${${match[1]}//:/\\:}:${match[2]:l}} )
local all
zstyle -t ":completion:${curcontext}:targets" extended && all=-A
targets=( ${${(f)"$(_call_program targets $words[1] $all -sT $opt_args[(I)(-N|--nosearch)] ${(kv)opt_args[(I)(-f|--rakefile)]} 2>/dev/null)"}/(#b)rake ([^ ]##) ##\# (*)/${${match[1]}//:/\\:}:${match[2]:l}} )
if (( ! ${targets[(I)rake aborted!]} )) then
_describe -t targets 'rake target' targets && ret=0
else