Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed annoying up/down arrow problem in TTY

  • Loading branch information...
commit b899058f2067f0143e37721e46f15aadc510e86d 1 parent 60f0fff
graysky authored
Showing with 6 additions and 15 deletions.
  1. +1 −0  dotfiles/.mpdconf
  2. +5 −15 dotfiles/shell/.zsh/lib/keys.zsh
1  dotfiles/.mpdconf
View
@@ -105,3 +105,4 @@ filesystem_charset "UTF-8"
id3v1_encoding "ISO-8859-1"
#
###############################################################################
+
20 dotfiles/shell/.zsh/lib/keys.zsh
View
@@ -1,11 +1,9 @@
-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 -v # set vim bindings
# http://zshwiki.org/home/zle/bindkeys
+bindkey "^[[A" history-beginning-search-backward
+bindkey "^[[B" history-beginning-search-forward
+
typeset -A key
key[Home]=${terminfo[khome]}
@@ -25,16 +23,8 @@ key[Enter]=${terminfo[kent]}
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
-[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-beginning-search
-[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-beginning-search
+#[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-beginning-search
+#[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-beginning-search
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
[[ -n "${key[Enter]}" ]] && bindkey "${key[Enter]}" enter
-
-# Finally, make sure the terminal is in application mode, when zle is
-# active. Only then are the values from $terminfo valid.
-zle-line-init () { echoti smkx }
-zle-line-finish () { echoti rmkx }
-
-zle -N zle-line-init
-zle -N zle-line-finish
Please sign in to comment.
Something went wrong with that request. Please try again.