completions/rake: List all tasks (#478)

My rake (13.0.6) generates empty list for completition without the flag `--all`
This commit is contained in:
Richard Kovacs
2023-09-23 18:05:17 +09:00
committed by GitHub
parent 72b8e67139
commit 8e5e43e401
+1 -1
View File
@@ -7,7 +7,7 @@ function _rakecomplete {
if [ -f Rakefile ]; then
recent=`ls -t .rake_tasks~ Rakefile **/*.rake 2> /dev/null | head -n 1`
if [[ $recent != '.rake_tasks~' ]]; then
rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~
rake --silent --tasks --all | cut -d " " -f 2 > .rake_tasks~
fi
COMPREPLY=($(compgen -W "`cat .rake_tasks~`" -- ${COMP_WORDS[COMP_CWORD]}))
return 0