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 <morningstar202604@users.noreply.github.com>
This commit is contained in:
Morningstar202604andMorningstar202604 authored and GitHub committed 2026-11-24 11:27:54 -08:00
1 parent 2aa7aed78b
commit 49a6348eac
1 file changed
+1 -1
+1 -1
View File
@@ -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
}