2019-10-21 09:18:47 +02:00
|
|
|
function _cheat_autocomplete {
|
2019-10-21 12:07:26 +02:00
|
|
|
sheets=$(cheat -l | cut -d' ' -f1)
|
|
|
|
COMPREPLY=()
|
|
|
|
if [ $COMP_CWORD = 1 ]; then
|
|
|
|
COMPREPLY=(`compgen -W "$sheets" -- $2`)
|
|
|
|
fi
|
2019-10-21 09:18:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
complete -F _cheat_autocomplete cheat
|