z.lua is fast enough for most cases, the path tracking action will be triggered each time when you change your current directory.
So I still recommend the pure lua script for portability and flexibility, but for someone who really cares about very high performance, this module can be helpful.
- Speeds up
z.luafor history tracking and matching. - Easy to install.
sudo apt-get install musl-toolsgit clone https://github.com/skywind3000/czmod.git ~/github/czmod
cd ~/github/czmod
sh build.shczmod must be initialized after z.lua:
bash:
eval "$(lua ~/github/z.lua/z.lua --init bash enhanced once echo)"
source ~/github/czmod/czmod.bashzsh:
eval "$(lua ~/github/z.lua/z.lua --init zsh enhanced once echo)"
source ~/github/czmod/czmod.zshAverage performance:
| Name | czmod | z.lua |
|---|---|---|
| Update Time | 1.6ms | 13.2ms |
| Query Time | 1.5ms | 9.8ms |
TODO