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
commit 2c0099c28a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

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