mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 14:01:36 +01:00
10 lines
224 B
Bash
Executable File
10 lines
224 B
Bash
Executable File
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
|