mirror of
https://github.com/cheat/cheat.git
synced 2025-09-04 19:18:29 +02:00
Added autocompletion for fish shell
This commit is contained in:
9
autocompletion/cheat.fish
Normal file
9
autocompletion/cheat.fish
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#completion for cheat
|
||||||
|
complete -c cheat -s h -l help -f -x --description "Display help and exit"
|
||||||
|
complete -c cheat -s e -l edit -f -x --description "Edit <cheatsheet>"
|
||||||
|
complete -c cheat -s l -l list -f -x --description "List all available cheatsheets"
|
||||||
|
complete -c cheat -s d -l cheat-directories -f -x --description "List all current cheat dirs"
|
||||||
|
complete -c cheat --authoritative -f
|
||||||
|
for cheatsheet in (cheat -l | cut -d' ' -f1)
|
||||||
|
complete -c cheat -a "$cheatsheet"
|
||||||
|
end
|
6
setup.py
6
setup.py
@ -18,5 +18,7 @@ setup(name='cheat',
|
|||||||
if '.' not in f]},
|
if '.' not in f]},
|
||||||
scripts=['cheat'],
|
scripts=['cheat'],
|
||||||
data_files=[('/usr/share/zsh/site-functions', ['autocompletion/cheat.zsh']),
|
data_files=[('/usr/share/zsh/site-functions', ['autocompletion/cheat.zsh']),
|
||||||
('/etc/bash_completion.d' , ['autocompletion/cheat.bash'])]
|
('/etc/bash_completion.d' , ['autocompletion/cheat.bash']),
|
||||||
)
|
('/usr/share/fish/completions' , ['autocompletion/cheat.fish'])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
Reference in New Issue
Block a user