Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skywind3000/czmod
:rocket: Native Module Written in C to Boost z.lua !!
https://github.com/skywind3000/czmod
autojump bash cd fasd jump shell z zlua zoxide zsh
Last synced: 3 months ago
JSON representation
:rocket: Native Module Written in C to Boost z.lua !!
- Host: GitHub
- URL: https://github.com/skywind3000/czmod
- Owner: skywind3000
- License: mit
- Created: 2020-03-17T03:33:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-03T17:39:52.000Z (about 2 years ago)
- Last Synced: 2024-08-01T13:19:59.164Z (6 months ago)
- Topics: autojump, bash, cd, fasd, jump, shell, z, zlua, zoxide, zsh
- Language: C
- Homepage:
- Size: 68.4 KB
- Stars: 43
- Watchers: 5
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Preface
[z.lua](https://github.com/skywind3000/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.
## Features
- Speeds up `z.lua` for history tracking and matching.
- Easy to install.## Install
### Install musl-gcc
```bash
sudo apt-get install musl-tools
```### Build the binary
```Bash
git clone https://github.com/skywind3000/czmod.git ~/github/czmod
cd ~/github/czmod
sh build.sh
```### Enable Czmod
`czmod` must be initialized after `z.lua`:
bash:
```bash
eval "$(lua ~/github/z.lua/z.lua --init bash enhanced once echo)"
source ~/github/czmod/czmod.bash
```zsh:
```bash
eval "$(lua ~/github/z.lua/z.lua --init zsh enhanced once echo)"
source ~/github/czmod/czmod.zsh
```## Benchmark
Average performance:
| Name | czmod | z.lua |
|-|-|-|
| **Update Time** | 1.6ms | 13.2ms |
| **Query Time** | 1.5ms | 9.8ms |## Credit
TODO