mirror of https://github.com/cheat/cheat.git
adding the autocompletion back
This commit is contained in:
parent
201cd1d629
commit
33e33dc7b7
|
@ -1,6 +1,9 @@
|
||||||
function _cheat_autocomplete {
|
function _cheat_autocomplete {
|
||||||
wdlist='cheat -l|awk "{print $1}"'
|
sheets=$(cheat -l | cut -d' ' -f1)
|
||||||
COMPREPLY=(`compgen -W "$wdlist"`)
|
COMPREPLY=()
|
||||||
|
if [ $COMP_CWORD = 1 ]; then
|
||||||
|
COMPREPLY=(`compgen -W "$sheets" -- $2`)
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -F _cheat_autocomplete cheat
|
complete -F _cheat_autocomplete cheat
|
||||||
|
|
Loading…
Reference in New Issue