mirror of
https://github.com/Erreur32/cheat.git
synced 2024-11-16 00:48:36 +01:00
Fix zsh autocompletion file
This commit is contained in:
parent
545c35722a
commit
e087674668
1 changed files with 3 additions and 10 deletions
|
@ -1,12 +1,5 @@
|
||||||
#compdef cheat
|
#compdef cheat
|
||||||
|
|
||||||
declare -a cheats cheats_in_this_dir
|
declare -a cheats
|
||||||
|
cheats=$(cheat -l | cut -d' ' -f1)
|
||||||
for directory in $(cheat --cheat_directories); do
|
_arguments "1:cheats:(${cheats})" && return 0
|
||||||
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
|
|
||||||
|
|
Loading…
Reference in a new issue