This project aims to provide a highly complete set of ZSH completions for Nix, NixOS, NixOps, and the surrounding ecosystem.
Setting programs.zsh.enable = true
in /etc/nixos/configuration.nix
will automatically install and enable nix-zsh-compeletions
.
cd ~/.oh-my-zsh/custom/plugins
git clone git@github.com:nix-community/nix-zsh-completions.git
Then add nix-zsh-completions
to the plugins list in ~/.zshrc
If you want your prompt to be prefixed by [nix-shell]
when you're in a nix-shell add this to your zshrc:
prompt_nix_shell_setup
Add the following to ~/.zshrc
antigen bundle git@github.com:nix-community/nix-zsh-completions.git
Clone this repository and add the following to ~/.zshrc
with the path to
nix-zsh-completions
updated as necessary.
source $HOME/nix-zsh-completions/nix-zsh-completions.plugin.zsh
fpath=($HOME/nix-zsh-completions $fpath)
autoload -U compinit && compinit
The completion scripts are known to be broken in ZSH version 5.0.8
or older, 5.2
or newer works.