Commit 40c4db2dabfb581954a3e04f5dc11ab75433a174

Changed the rake autocomplete cache to use a dir, added clean_rake_cache command

Commit diff

completions/rake.fish

 
11function __cache_or_get_rake_completion -d "Create rake completions"
2 mkdir -p "/tmp/rake_completion_cache"
23 set -l hashed_pwd (md5 -q -s (pwd))
3 set -l rake_cache_file "/tmp/rake_completion_cache_$hashed_pwd"
4 set -l rake_cache_file "/tmp/rake_completion_cache/$hashed_pwd"
45
56 if not test -f "$rake_cache_file"
67 rake -T 2>&1 | sed -e "/^(/d" -e "s/^rake \([a-z:_0-9!\-]*\).*/\1/" > "$rake_cache_file"
toggle raw diff

functions/clean_rake_cache.fish

 
1function clean_rake_cache -d "Clean the rake autocomplete cache"
2 for a in /tmp/rake_completion_cache/*
3 rm "$a"
4 end
5end
toggle raw diff