Merge pull request #479 from zhujian0805/master

adding the cheat autocomplete script back :)
This commit is contained in:
Chris Allen Lane
2019-11-04 18:12:12 -05:00
committed by GitHub

View File

@ -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