This commit is contained in:
crater2150 2018-08-28 20:35:06 +02:00
parent 209b0cc260
commit 5b127cca55
3 changed files with 95 additions and 2 deletions

View file

@ -75,6 +75,18 @@ local function accept-or-recall-and-infer-history() {
fi
}
zle -N accept-or-recall-and-infer-history
bindkey "\e^M" accept-or-recall-and-infer-history
if exists incstring; then
local function inc-last-command() {
if [[ -z $BUFFER ]]; then
BUFFER=$(incstring "$(history -n -1)");
else
BUFFER=$(incstring "$BUFFER");
fi
zle vi-end-of-line
}
zle -N inc-last-command
bindkey "^A" inc-last-command
fi