Skip to main content

jnc completion

Generates shell completion scripts for jnc. Completions provide tab-completion for commands, subcommands, options, and arguments in your shell.

Usage

jnc completion --shell <SHELL>

Options

OptionDescription
--shellThe shell to generate completions for (required)

Supported Shells

ShellValue
Bashbash
Fishfish
Zshzsh
Elvishelvish

Examples

Bash

Add to your ~/.bashrc:
eval "$(jnc completion --shell bash)"

Fish

Save to the Fish completions directory:
jnc completion --shell fish > ~/.config/fish/completions/jnc.fish

Zsh

Add to your ~/.zshrc:
eval "$(jnc completion --shell zsh)"
Or save to a file in your fpath:
jnc completion --shell zsh > ~/.zfunc/_jnc
Make sure ~/.zfunc is in your fpath (add fpath=(~/.zfunc $fpath) to ~/.zshrc before compinit).

Elvish

Add to your ~/.elvish/rc.elv:
eval (jnc completion --shell elvish | slurp)