adding the autocompletion back
This commit is contained in:
1 parent
201cd1d629
commit
33e33dc7b7
1 file changed
+5
-2
@@ -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
|
||||||
Reference in new issue
Block a user