تخطَّ إلى المحتوى

nself completion

هذا المحتوى غير متوفر بلغتك بعد.

Generate shell completion scripts.

nself completion [bash|zsh|fish]

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.

SubcommandDescription
bashGenerate Bash completion script
zshGenerate Zsh completion script
fishGenerate Fish completion script
Terminal window
# Add to current session
eval "$(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
Terminal window
# Add to current session
eval "$(nself completion zsh)"
# Persist across sessions, add to ~/.zshrc
echo 'eval "$(nself completion zsh)"' >> ~/.zshrc
# Or write to a completions directory
nself completion zsh > "${fpath[1]}/_nself"
Terminal window
# Add to current session
nself completion fish | source
# Persist across sessions
nself completion fish > ~/.config/fish/completions/nself.fish
Terminal window
# Generate Bash completion
nself completion bash
# Generate Zsh completion
nself completion zsh
# Generate Fish completion
nself completion fish
# Instant setup for Bash
eval "$(nself completion bash)"
# Instant setup for Zsh
eval "$(nself completion zsh)"

Commands | Home