Navigate directory history
masterZsh for Humans maintains a persistent dirstack for directory navigation.
Key Bindings
cd -<TAB>: View directory history via completion.Alt+Left/Shift+Left(macOS): Go back indirstack(like a web browser back button).Alt+Right/Shift+Right(macOS): Go forward indirstack.Alt+Up(<kbd>Shift+Up</kbd> on macOS): Go to the parent directory.Alt+Down(<kbd>Shift+Down</kbd> on macOS): Choose a subdirectory.Alt+R: Invokez4h-fzf-dir-history(fzf-based directory history search, similar toautojump).
Customizing FZF Bindings
You can rebind these widgets or change how Tab behaves in fzf-based widgets using zstyle.
Example: Rebinding Alt+Down to the fzf directory history widget and setting Tab to repeat:
zstyle ':z4h:fzf-dir-history' fzf-bindings tab:repeat
zstyle ':z4h:cd-down' fzf-bindings tab:repeat
z4h bindkey z4h-fzf-dir-history Alt+Down