mirror of https://github.com/cheat/cheat.git
Merge pull request #479 from zhujian0805/master
adding the cheat autocomplete script back :)
This commit is contained in:
commit
2c0099c28a
|
@ -0,0 +1,9 @@
|
|||
function _cheat_autocomplete {
|
||||
sheets=$(cheat -l | sed -n '2,$p'|cut -d' ' -f1)
|
||||
COMPREPLY=()
|
||||
if [ $COMP_CWORD = 1 ]; then
|
||||
COMPREPLY=(`compgen -W "$sheets" -- $2`)
|
||||
fi
|
||||
}
|
||||
|
||||
complete -F _cheat_autocomplete cheat
|
Loading…
Reference in New Issue