How agkozak/zsh-z works
Zsh-z is a Zsh directory-history plugin: it records visited directories, ranks them by frecency, and uses partial matches to jump to a likely destination. Users can also list or remove entries and complete directory matches. Prompt-time recording writes asynchronously; documented safeguards include file locking, bounded lock waits, and private database permissions. The repository provides no source excerpts, so the relationships below are limited to capabilities and flows explicitly described in the README.
Main entry points: zsh-z.plugin.zsh Z command · _zshz Tab completion
Components 10
Shell interaction
- Z command
zsh-z.plugin.zsh - Tab completion
_zshz
Directory history
- Prompt recording
zsh-z.plugin.zsh - Frecency matching
zsh-z.plugin.zsh - History listing and removal
zsh-z.plugin.zsh - Directory database
Write safety
- File locking
zsh-z.plugin.zsh
Other components
- Shell user
- zsh/system
- Target directory
Connections 11
- Shell user → Z command: runs
README.md - Z command → Frecency matching: matches paths
README.md - Frecency matching → Directory database: reads history
README.md - Z command → Target directory: jumps to
README.md - Shell user → Tab completion: requests completion
README.md - Tab completion → Directory database: completes from
README.md - Shell user → History listing and removal: lists or removes
README.md - History listing and removal → Directory database: updates history
README.md - Prompt recording → Directory database: writes visits
README.md - Prompt recording → File locking: guards writes
README.md - File locking → zsh/system: uses locking
README.md