|
@@ -11,9 +11,10 @@ dirhistory_past=($PWD)
|
|
|
dirhistory_future=()
|
|
|
export dirhistory_past
|
|
|
export dirhistory_future
|
|
|
-
|
|
|
export DIRHISTORY_SIZE=30
|
|
|
|
|
|
+alias cde='dirhistory_cd'
|
|
|
+
|
|
|
# Pop the last element of dirhistory_past.
|
|
|
# Pass the name of the variable to return the result in.
|
|
|
# Returns the element if the array was not empty,
|
|
@@ -136,7 +137,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
|
|
@@ -151,7 +156,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
|
|
@@ -200,6 +209,7 @@ for keymap in emacs vicmd viins; do
|
|
|
case "$TERM_PROGRAM" in
|
|
|
Apple_Terminal) bindkey -M $keymap "^[[A" dirhistory_zle_dirhistory_up ;; # Terminal.app
|
|
|
iTerm.app) bindkey -M $keymap "^[^[[A" dirhistory_zle_dirhistory_up ;; # iTerm2
|
|
|
+ ghostty) bindkey -M $keymap "^[[1;3A" dirhistory_zle_dirhistory_up ;; # ghostty
|
|
|
esac
|
|
|
|
|
|
if (( ${+terminfo[kcuu1]} )); then
|
|
@@ -215,6 +225,7 @@ for keymap in emacs vicmd viins; do
|
|
|
case "$TERM_PROGRAM" in
|
|
|
Apple_Terminal) bindkey -M $keymap "^[[B" dirhistory_zle_dirhistory_down ;; # Terminal.app
|
|
|
iTerm.app) bindkey -M $keymap "^[^[[B" dirhistory_zle_dirhistory_down ;; # iTerm2
|
|
|
+ ghostty) bindkey -M $keymap "^[[1;3B" dirhistory_zle_dirhistory_down ;; # ghostty
|
|
|
esac
|
|
|
|
|
|
if (( ${+terminfo[kcud1]} )); then
|