From 640e40dc81833624281f5c146b514417f251b4c3 Mon Sep 17 00:00:00 2001 Message-Id: <640e40dc81833624281f5c146b514417f251b4c3.1608068274.git.joerg@jo-so.de> From: =?UTF-8?q?J=C3=B6rg=20Sommer?= Date: Tue, 15 Dec 2020 22:32:46 +0100 Subject: [PATCH] Completion/_rake: add zsytle for 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 all-targets true --- Completion/Unix/Command/_rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Completion/Unix/Command/_rake b/Completion/Unix/Command/_rake index 8814edaa5..88c25d7cf 100644 --- a/Completion/Unix/Command/_rake +++ b/Completion/Unix/Command/_rake @@ -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}" all-targets && 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 -- 2.29.2