This is a high level crate that allows you to define your own zsh module.
Getting started
To get started, first, you need to create library, not an executable. Then, change your crate
type to "cdylib" on your Cargo.toml:
[]
= ["cdylib"]
Boilerplate
On your lib.rs, you need to put a [impl_hooks] macro call, alongside a setup function
with the following signature:
use
impl_hooks!;
Defining [Actions]
The main point part of crating a module is implementing [Actions]. Here's an example module:
use
impl_hooks!;
;
Installing
When your module is ready, copy your shared library to your distribution's zsh module folder,
without the lib prefix.
On Arch Linux, it's /usr/lib/zsh/<zsh-version>/zsh/.
That is it!
If everything went fine, you can load it in zsh using the following command: