diff options
| author | Marc Cornellà <marc@mcornella.com> | 2025-03-20 20:07:36 +0100 |
|---|---|---|
| committer | Marc Cornellà <marc@mcornella.com> | 2025-03-20 20:10:04 +0100 |
| commit | 068299685ceac5af570232ca5daa0ecd4d1f7d62 (patch) | |
| tree | 027a0d9b02cae7e32687a5b5e93be37b5cebd4d4 /plugins/dirhistory | |
| parent | 5eaebdf0fe870a8c599c89c6b70a0c5ee8c78b42 (diff) | |
| download | zsh-068299685ceac5af570232ca5daa0ecd4d1f7d62.tar.gz zsh-068299685ceac5af570232ca5daa0ecd4d1f7d62.tar.bz2 zsh-068299685ceac5af570232ca5daa0ecd4d1f7d62.zip | |
fix(dirhistory): support iTerm2 natural text key bindings (#11026)
Fixes #11026
Fixes #11407
Diffstat (limited to 'plugins/dirhistory')
| -rw-r--r-- | plugins/dirhistory/dirhistory.plugin.zsh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index 8d66de7f5..4650666be 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -136,8 +136,11 @@ for keymap in emacs vicmd viins; do case "$TERM_PROGRAM" in Apple_Terminal) bindkey -M $keymap "^[b" dirhistory_zle_dirhistory_back ;; # Terminal.app - iTerm.app) bindkey -M $keymap "^[^[[D" dirhistory_zle_dirhistory_back ;; # iTerm2 ghostty) bindkey -M $keymap "^[b" dirhistory_zle_dirhistory_back ;; # ghostty + iTerm.app) + bindkey -M $keymap "^[^[[D" dirhistory_zle_dirhistory_back + bindkey -M $keymap "^[b" dirhistory_zle_dirhistory_back + ;; esac if (( ${+terminfo[kcub1]} )); then @@ -152,8 +155,11 @@ for keymap in emacs vicmd viins; do case "$TERM_PROGRAM" in Apple_Terminal) bindkey -M $keymap "^[f" dirhistory_zle_dirhistory_future ;; # Terminal.app - iTerm.app) bindkey -M $keymap "^[^[[C" dirhistory_zle_dirhistory_future ;; # iTerm2 ghostty) bindkey -M $keymap "^[f" dirhistory_zle_dirhistory_future ;; # ghostty + iTerm.app) + bindkey -M $keymap "^[^[[C" dirhistory_zle_dirhistory_future + bindkey -M $keymap "^[f" dirhistory_zle_dirhistory_future + ;; esac if (( ${+terminfo[kcuf1]} )); then |
