Fix zsh autocompletion file

This commit is contained in:
a-sk 2013-10-03 23:55:52 +04:00
parent 545c35722a
commit e087674668

View File

@ -1,12 +1,5 @@
#compdef cheat
declare -a cheats cheats_in_this_dir
for directory in $(cheat --cheat_directories); do
cheats_in_this_dir=($directory/*(N:r:t))
[[ ${#cheats_in_this_dir} > 0 ]] && cheats+=($cheats_in_this_dir)
done
_arguments "1:cheats:(${cheats})"
return 1
declare -a cheats
cheats=$(cheat -l | cut -d' ' -f1)
_arguments "1:cheats:(${cheats})" && return 0