z.lua is a command-line directory jumper that learns where you work and uses that history to move around the filesystem with short queries.
It ranks visited directories using frecency, combining how often and how recently a path has been used. A query can contain several terms or Lua patterns, and z.lua selects the highest-ranked matching directory. Its enhanced matching mode gives extra weight to the final path component and can fall back to ordinary directory changes when no database entry matches.
This is free and open source software.
Key Features
- Supports Bash, Zsh, POSIX shells, Fish, Nushell, PowerShell and Windows command environments.
- Frecency-based ranking promotes directories that are both frequently and recently visited.
- Enhanced matching favours matches against the final path component while retaining a fallback to the original matching method.
- Interactive selection lets you choose between multiple matches instead of automatically accepting the highest-ranked path.
- Optional fzf integration provides fuzzy selection and completion.
- Backward navigation can jump directly to a parent directory, project root or a parent matching a supplied term.
- A persistent directory stack provides quick access to recently visited paths across shell sessions.
- Matching can be restricted to subdirectories of the current working directory.
- Directories can be excluded from tracking and the data file, command name, aging threshold and underlying cd command are configurable.
- An optional native module written in C can accelerate database operations.
- The main implementation is self-contained in a single Lua script.
Website: github.com/skywind3000/z.lua
Support:
Developer: Linwei
License: MIT License
z.lua is written in Lua. Learn Lua with our recommended free books and free tutorials.
Related Software
| Shell tools | |
|---|---|
| fzf | Command-line fuzzy finder for your shell |
| zoxide | Smarter cd command, inspired by z and autojump |
| broot | Reviewed under our Excellent Utilities series |
| McFly | Also reviewed under our Excellent Utilities series |
| z | Maintains a jump-list of the directories you actually use |
| autojump | Offers a fast way to navigate your filesystem |
| z.lua | Helps you navigate faster by learning your habits |
| HSTR | Bash and zsh shell history suggest box |
| Zsh-z | Fast directory jumping based on frecency |
| enhancd | Next-generation cd command |
| fzy | Simple, fast fuzzy finder for the terminal |
| Navita | Rapid directory traversal |
| Jump | Quick and fuzzy directory jumper |
| walk | Simple and minimalistic terminal navigator |
| lacy | cd alternative that makes navigating much more efficient |
| DF-SHOW | Directory File Show |
| fz | Adds fuzzy search to tab completion of z |
| pazi | Fast autojump helper |
| jumper | Files/directories jumper |
| cdhist | Linux shell cd history directory stack |
| icd | Shell utility that makes changing directories quicker and more convenient |
| SD | Dynamic directory navigation from the command line |
| Dongle | Move around deep directory trees |
| cdwe | cd with env vars |
| fastdiract | Quick shell navigation and command execution |
| zm | cd for lazy people |
| slingshot | Lightweight tool to browse files in the terminal |
| qcd | Quickly change directory |
| nav | Quickly navigate through directories |
| menucd | Directory browser and changer |
| kn | Navigate folders quickly |
| jmp | The superior cd |
| gump | Smarter cd command |
Read our verdict in the software roundup.
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.