1448d234d6d9c25f64a48b16379b34db28a36898
- Author
- Marc Cornellà <hello@mcornella.com>
- Committer
- Marc Cornellà <hello@mcornella.com>
- Date
Message
fix(dirhistory): fix Up/Down key bindings for Terminal.app
Reference: https://github.com/ohmyzsh/ohmyzsh/commit/7f49494#commitcomment-60117011
Diff
1diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh
2index 26ef074943acbb00a51b4803dacf676e9f3960bd..971eb6540a786d74392c509b3b893f4f6ba0dd1f 100644
3--- a/plugins/dirhistory/dirhistory.plugin.zsh
4+++ b/plugins/dirhistory/dirhistory.plugin.zsh
5@@ -182,7 +182,7 @@ bindkey "\e\e[A" dirhistory_zle_dirhistory_up # Putty
6 bindkey "\eO3A" dirhistory_zle_dirhistory_up # GNU screen
7 case "$TERM_PROGRAM" in
8 iTerm.app) bindkey "^[^[[A" dirhistory_zle_dirhistory_up ;; # iTerm2
9-Apple_Terminal) bindkey "^[OA" dirhistory_zle_dirhistory_up ;; # Terminal.app
10+Apple_Terminal) bindkey "^[[A" dirhistory_zle_dirhistory_up ;; # Terminal.app
11 esac
12 if (( ${+terminfo[kcuu1]} )); then
13 bindkey "^[${terminfo[kcuu1]}" dirhistory_zle_dirhistory_up # urxvt
14@@ -195,7 +195,7 @@ bindkey "\e\e[B" dirhistory_zle_dirhistory_down # Putty
15 bindkey "\eO3B" dirhistory_zle_dirhistory_down # GNU screen
16 case "$TERM_PROGRAM" in
17 iTerm.app) bindkey "^[^[[B" dirhistory_zle_dirhistory_down ;; # iTerm2
18-Apple_Terminal) bindkey "^[OB" dirhistory_zle_dirhistory_down ;; # Terminal.app
19+Apple_Terminal) bindkey "^[[B" dirhistory_zle_dirhistory_down ;; # Terminal.app
20 esac
21 if (( ${+terminfo[kcud1]} )); then
22 bindkey "^[${terminfo[kcud1]}" dirhistory_zle_dirhistory_down # urxvt