mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 21:52:12 +01:00
Add zsh cheats completions
This commit is contained in:
parent
5c51f457a0
commit
f20c0aba20
1 changed files with 12 additions and 0 deletions
12
_cheat
Normal file
12
_cheat
Normal file
|
@ -0,0 +1,12 @@
|
|||
#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
|
Loading…
Reference in a new issue