From 49a6348eac44a47cd6aea05eda9673a5df6c08e4 Mon Sep 17 00:00:00 2001 From: Morningstar202604 <320475654+Morningstar202604@users.noreply.github.com> Date: Wed, 25 Nov 2026 03:27:54 +0800 Subject: [PATCH] fix(dirhistory): fix typo in push_future duplicate check (#14149) `push_future` referenced `$dirhistory_futuret` (missing the 'e' - a typo) in its duplicate check, so `$dirhistory_futuret[...]` was an undefined variable and consecutive identical entries were never skipped. ALT-RIGHT navigation then revisited the same directory repeatedly. Match `push_past`, which uses `$dirhistory_past` correctly. Co-authored-by: Morningstar202604 --- plugins/dirhistory/dirhistory.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index 706bb6fb2..10e075b25 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -52,7 +52,7 @@ function push_future() { if [[ $#dirhistory_future -ge $DIRHISTORY_SIZE ]]; then shift dirhistory_future fi - if [[ $#dirhistory_future -eq 0 || $dirhistory_futuret[$#dirhistory_future] != "$1" ]]; then + if [[ $#dirhistory_future -eq 0 || $dirhistory_future[$#dirhistory_future] != "$1" ]]; then dirhistory_future+=($1) fi }