2013-09-12 03:25:10 +02:00
|
|
|
function _cheat_autocomplete {
|
2013-09-14 16:27:53 +02:00
|
|
|
sheets=$(cheat -l | cut -d' ' -f1)
|
2013-09-12 03:25:10 +02:00
|
|
|
COMPREPLY=()
|
|
|
|
if [ $COMP_CWORD = 1 ]; then
|
|
|
|
COMPREPLY=(`compgen -W "$sheets" -- $2`)
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
complete -F _cheat_autocomplete cheat
|