- Softwrap mode:
- Toggle
Blob of completions/rake.fish
(raw blob data)
| 1 | function __cache_or_get_rake_completion -d "Create rake completions" |
| 2 | mkdir -p "/tmp/rake_completion_cache_for_$USER" |
| 3 | set -l hashed_pwd (md5 -q -s (pwd)) |
| 4 | set -l rake_cache_file "/tmp/rake_completion_cache_for_$USER/$hashed_pwd" |
| 5 | |
| 6 | if not test -f "$rake_cache_file" |
| 7 | rake -T 2>&1 | sed -e "/^(/d" -e "s/^rake \([a-z:_0-9!\-]*\).*/\1/" > "$rake_cache_file" |
| 8 | end |
| 9 | |
| 10 | cat "$rake_cache_file" |
| 11 | end |
| 12 | |
| 13 | complete -x -c rake -a "(__cache_or_get_rake_completion)" --description 'Rake Task' |
