mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-03-27 21:37:05 +01:00
fix(dirhistory): support iTerm2 natural text key bindings (#11026)
Fixes #11026 Fixes #11407
This commit is contained in:
parent
5eaebdf0fe
commit
068299685c
1 changed files with 8 additions and 2 deletions
|
@ -136,8 +136,11 @@ for keymap in emacs vicmd viins; do
|
||||||
|
|
||||||
case "$TERM_PROGRAM" in
|
case "$TERM_PROGRAM" in
|
||||||
Apple_Terminal) bindkey -M $keymap "^[b" dirhistory_zle_dirhistory_back ;; # Terminal.app
|
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
|
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
|
esac
|
||||||
|
|
||||||
if (( ${+terminfo[kcub1]} )); then
|
if (( ${+terminfo[kcub1]} )); then
|
||||||
|
@ -152,8 +155,11 @@ for keymap in emacs vicmd viins; do
|
||||||
|
|
||||||
case "$TERM_PROGRAM" in
|
case "$TERM_PROGRAM" in
|
||||||
Apple_Terminal) bindkey -M $keymap "^[f" dirhistory_zle_dirhistory_future ;; # Terminal.app
|
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
|
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
|
esac
|
||||||
|
|
||||||
if (( ${+terminfo[kcuf1]} )); then
|
if (( ${+terminfo[kcuf1]} )); then
|
||||||
|
|
Loading…
Add table
Reference in a new issue