Skip to content

Add dir-nav module for browser-style directory navigation#2141

Open
idirxv wants to merge 1 commit into
sorin-ionescu:masterfrom
idirxv:feature/dir-nav
Open

Add dir-nav module for browser-style directory navigation#2141
idirxv wants to merge 1 commit into
sorin-ionescu:masterfrom
idirxv:feature/dir-nav

Conversation

@idirxv

@idirxv idirxv commented Apr 14, 2026

Copy link
Copy Markdown

I've been using the dirhistory plugin from oh-my-zsh for a while and missed it after switching to Prezto, so helping with claude code, I ported the idea as a new module.

It binds Alt+Arrow keys to browser-style directory navigation:

Key Action
Alt+Left Back to previous directory
Alt+Right Forward (undo back)
Alt+Up Parent directory
Alt+Down First child directory (alphabetical)

Regular cd commands also push onto the back stack and clear the forward stack, so the history stays consistent regardless of how you navigate.

Implementation notes

  • Depends on the editor module for $key_info

Provides back/forward/up/down directory navigation bound to Alt+Arrow
keys, maintaining a history stack that mirrors browser navigation
semantics. Regular cd commands outside the widgets also update the
back stack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants