How rupa/z works
Z is a shell utility that learns directory usage and lets users jump to matching directories by frecency, rank, or recency. Its documented workflow is: shell prompt hooks maintain a data file; the user invokes z with optional regexes and flags; Z selects or lists matching directories and may change the shell’s current directory. Completion is a separate documented capability. Source excerpts were unavailable, so relationships below are supported by the README only.
Main entry points: z.sh Z command
Components 10
Directory tracking
- Prompt hook
z.sh - Directory tracker
z.sh - Directory data
z.sh
Directory navigation
- Z command
z.sh - Regex matching
z.sh - Frecency ranking
z.sh - Result action
z.sh
Shell completion
- Tab completion
z.sh
Other components
- User
- Interactive shell
Connections 11
- User → Z command: invokes
README - Interactive shell → Prompt hook: runs prompt hook
README - Prompt hook → Directory tracker: tracks directories
README - Directory tracker → Directory data: updates
README - Z command → Directory data: reads
README - Z command → Regex matching: passes queries
README - Regex matching → Frecency ranking: ranks matches
README - Z command → Result action: selects or lists
README - Result action → Interactive shell: changes directory
README - User → Tab completion: requests completion
README - Tab completion → Regex matching: completes matches
README