|
@@ -29,13 +29,23 @@ setopt noshwordsplit
|
|
|
|
|
|
bindkey -e
|
|
|
|
|
|
+# https://bbs.archlinux.org/viewtopic.php?id=151738
|
|
|
+# ensures terminfo is setup properly
|
|
|
+if [[ -n ${terminfo[smkx]} ]] && [[ -n ${terminfo[rmkx]} ]]; then
|
|
|
+ function zle-line-init () {echoti smkx}
|
|
|
+ function zle-line-finish () {echoti rmkx}
|
|
|
+
|
|
|
+ zle -N zle-line-init
|
|
|
+ zle -N zle-line-finish
|
|
|
+fi
|
|
|
+
|
|
|
# https://bbs.archlinux.org/viewtopic.php?pid=1170080#p1170080
|
|
|
autoload up-line-or-beginning-search
|
|
|
autoload down-line-or-beginning-search
|
|
|
zle -N up-line-or-beginning-search
|
|
|
zle -N down-line-or-beginning-search
|
|
|
-bindkey "^[[A" up-line-or-beginning-search
|
|
|
-bindkey "^[[B" down-line-or-beginning-search
|
|
|
+bindkey "${terminfo[kcuu1]}" up-line-or-beginning-search
|
|
|
+bindkey "${terminfo[kcud1]}" down-line-or-beginning-search
|
|
|
|
|
|
autoload -z edit-command-line
|
|
|
zle -N edit-command-line
|