This commit is contained in:
Eric Freese 2016-01-26 20:51:44 -07:00
commit fc3f368acf
15 changed files with 224 additions and 708 deletions

11
lib/get_suggestion.zsh Normal file
View file

@ -0,0 +1,11 @@
_zsh_autosuggest_get_suggestion() {
local prefix=$1
local history_items=(${history[(R)$prefix*]})
for cmd in $history_items; do
if [ "${cmd:0:$#prefix}" = "$prefix" ]; then
echo $cmd
break
fi
done
}