mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-11-25 01:43:04 +01:00
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:
1 parent
2aa7aed78b
commit
49a6348eac
1 file changed
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user