Z is quite practicalCdCommand enhancement script. bash and zsh are supported currently. With z, we can implement faster navigation on the Linux Command Line.
Install
To install z in your system, run the following commands:
Mkdir ~ /Codecd ~ /Codegit clone https://github.com/rupa/z.gitecho 'source ~ /Code/z. Sh'> ~ /. Zshrcsource ~ /. Zshrc
Note: If you are using bash. ZshrcReplace. Bashrc. In this way, z can be used normally.
Usage
Z willCdDirectory stored in~ /. ZFile. Once a record exists, you can directly use z to navigate the directory. For example:
Z co
Go~ /CodeDirectory. Z is matched by regular expressions and takes you to the directory with the highest frequency.
In addition, you can select different navigation behaviors by specifying different options:
-R: Navigate to the top directory
-T: Navigate to the recently accessed directory
-L: List directories by usage frequency
It is worth mentioning that z also supports Tab completion, which will save you a lot of time.