nself completion
nself completion
Section titled “nself completion”Generate shell completion scripts.
Synopsis
Section titled “Synopsis”nself completion [bash|zsh|fish]Description
Section titled “Description”nself completion generates shell completion scripts for Bash, Zsh, and Fish. Once installed, pressing Tab will autocomplete nself commands, subcommands, and flags in your shell.
Completion scripts are generated by Cobra and support all commands and flags defined in the CLI.
Subcommands
Section titled “Subcommands”| Subcommand | Description |
|---|---|
bash | Generate Bash completion script |
zsh | Generate Zsh completion script |
fish | Generate Fish completion script |
Installation
Section titled “Installation”# Add to current sessioneval "$(nself completion bash)"
# Persist across sessions (Linux)nself completion bash > /etc/bash_completion.d/nself
# Persist across sessions (macOS with Homebrew bash)nself completion bash > $(brew --prefix)/etc/bash_completion.d/nself# Add to current sessioneval "$(nself completion zsh)"
# Persist across sessions, add to ~/.zshrcecho 'eval "$(nself completion zsh)"' >> ~/.zshrc
# Or write to a completions directorynself completion zsh > "${fpath[1]}/_nself"# Add to current sessionnself completion fish | source
# Persist across sessionsnself completion fish > ~/.config/fish/completions/nself.fishExamples
Section titled “Examples”# Generate Bash completionnself completion bash
# Generate Zsh completionnself completion zsh
# Generate Fish completionnself completion fish
# Instant setup for Basheval "$(nself completion bash)"
# Instant setup for Zsheval "$(nself completion zsh)"