Shell completions for the Zig compiler.
The _zig
file needs to be included in your $fpath
. This can be achieved in two ways:
- Move the
_zig
file to one of the folders listed in$fpath
. You can list these folders withprint -l $fpath
. - Add the folder containing
_zig
to the$fpath
. This can be achieved by addingfpath=(/path/to/this/repo/shell-completions $fpath)
to your~/.zshrc
file (to update the current terminal runsource ~/.zshrc
).
Once the $fpath
variable is updated, run compinit
to rebuild ~/.zcompdump
.
- Clone the plugin as
zig-shell-completions
git clone https://github.com/ziglang/shell-completions $ZSH/custom/plugins/zig-shell-completions
- Add the plugin
zig-shell-completions
to$plugin
plugins+=(zig-shell-completions)
curl -LO "https://raw.githubusercontent.com/ziglang/shell-completions/master/_zig.bash"
echo ". $PWD/_zig.bash" >> ~/.bashrc