nsc completion zsh

Generate the autocompletion script for the zsh shell.

completion zsh prints a zsh completion script for nsc to stdout. Sourcing or installing this script gives you tab-completion for nsc commands, subcommands, and flags in your shell.

If shell completion is not already enabled in your environment, you'll need to enable it once by adding the following to your ~/.zshrc:

echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions in your current shell session:

source <(nsc completion zsh)

To load completions for every new session, execute once:

# Linux:
nsc completion zsh > "${fpath[1]}/_nsc"
 
# macOS:
nsc completion zsh > $(brew --prefix)/share/zsh/site-functions/_nsc

You will need to start a new shell for this setup to take effect.

Usage

nsc completion zsh [--no-descriptions]

Example

$ source <(nsc completion zsh)

Options

--no-descriptions

Disable the descriptions shown alongside completion suggestions. By default, nsc includes a short description for each command, subcommand, and flag when completing; pass this flag if you'd rather see just the bare completion candidates.