Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Delivery
Implemented in #54 and released in 0.4.0. This changes the public navigation semantics; regenerate and reload shell integration after upgrading.
Motivation
The current downward route is created only by the configured up ticker and is cleared by successful builtin navigation. That means home and previous-directory navigation lose useful context:
~/Git/project $ cd
~ $ cd v
# expected: ~/Git/projectA browser-style model should remember the location being left for every successful wrapper-controlled navigation.
Proposed behavior
- keep a bounded, shell-local stack of previously visited directories
- record navigation through
cd,cd ~,cd -, direct paths, raw mode, aliases, mounts, Git shortcuts, zoxide, and the worktree picker - record only successful moves whose destination differs from the current directory
- never observe or record explicit
builtin cd, which remains the escape hatch - make one
vreturn to the previous navigation entry, even across unrelated directories or volumes - make repeated down tickers consume that many history entries atomically
- treat each character in repeated up navigation as a step:
^^^records each traversed parent sovvvcan retrace it - do not push the directory being left while consuming history, avoiding immediate loops
- preserve history after failed navigation
Examples
~/Git/project/src $ cd ^^^
~ $ cd vvv
~/Git/project/src
~/Git/project $ cd
~ $ cd v
~/Git/project
~/one $ cd /tmp/two
/tmp/two $ cd v
~/oneCross-shell requirements
- identical behavior in Bash, Zsh, Nushell, and PowerShell
- preserve paths containing spaces and platform-native path syntax
- preserve non-UTF-8 Unix paths wherever the shell permits them
- keep the history bounded to prevent unbounded shell state
- generated integration owns the history; it is not persisted between shell sessions
Compatibility and documentation
- replace the single
CJ_INTERNAL_DOWN_ROUTEmodel or provide a compatible transition - regenerate integration after upgrading
- document
vas browser-style back history rather than only descendant traversal - update exact error messages for empty and exhausted history
Acceptance criteria
- unit tests cover stack push, multi-pop, failed/no-op navigation, and exhaustion
- external integration tests cover every supported shell when available
- tests cover home,
cd -, unrelated paths, aliases/mounts, zoxide, worktree picker, and repeated^/v - Windows cross-compilation and platform CI remain green
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
test(shell): fix Windows browser history path expectations
feat(shell)!: add bounded shell-local directory history
test(shell): cover browser directory history across shells
test(shell): fix Windows browser history path expectations
chore(release): update version to 0.4.0 [skip ci]