summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2016-07-31 18:27:12 +0200
committerAlan Pearce2016-07-31 18:27:12 +0200
commit242e87a0eb6c5e452f5132e0aad08f7f3cec204f (patch)
treeb65e7cbc0ff02e3279a655b3cf5b178d3cafaa92
parent7c34e2c2a2315b1d4a59b5f20809b17a738c1674 (diff)
downloaddotfiles-242e87a0eb6c5e452f5132e0aad08f7f3cec204f.tar.lz
dotfiles-242e87a0eb6c5e452f5132e0aad08f7f3cec204f.tar.zst
dotfiles-242e87a0eb6c5e452f5132e0aad08f7f3cec204f.zip
Bind directory history keys more portably
-rw-r--r--tag-zsh/config/zsh/zshrc6
1 files changed, 4 insertions, 2 deletions
diff --git a/tag-zsh/config/zsh/zshrc b/tag-zsh/config/zsh/zshrc
index 63384f5..da63e64 100644
--- a/tag-zsh/config/zsh/zshrc
+++ b/tag-zsh/config/zsh/zshrc
@@ -62,6 +62,8 @@ alias lal="ll -A"
 alias lla="lal"
 alias llr="ll -t"
 
+zmodload zsh/terminfo
+
 bindkey '\e[3~' delete-char
 
 bindkey '\C-hd' describe-key-briefly
@@ -183,8 +185,8 @@ fi
 if zplug check alanpearce/zsh-directory-history
 then
 	unsetopt flow_control 			# Let me use ^S and ^Q
-	bindkey '\e[B' directory-history-search-backward
-	bindkey '\e[A' directory-history-search-forward
+	bindkey "$terminfo[kcuu1]" directory-history-search-backward
+	bindkey "$terminfo[kcud1]" directory-history-search-forward
 
 	bindkey -M emacs '^R' history-substring-search-up
 	bindkey -M emacs '^S' history-substring-search-down