🐚 leetrs completion
Generates shell autocomplete scripts for bash, zsh, fish, elvish, powershell, and
nushell.
Usage
leetrs completion <SHELL>
Arguments
| Argument | Supported Values | Description |
|---|---|---|
<SHELL> | bash, zsh, fish, elvish, powershell, nushell (or nu) | Target shell environment |
Setup Instructions
Zsh Setup
Add completion script to your ~/.zshrc:
# Generate and source zsh autocompletion
eval "$(leetrs completion zsh)"
Bash Setup
Add completion script to your ~/.bashrc:
eval "$(leetrs completion bash)"
Fish Setup
Save completion script to fish completions directory:
leetrs completion fish > ~/.config/fish/completions/leetrs.fish
Elvish Setup
Add completion script to your ~/.config/elvish/rc.elv:
eval (leetrs completion elvish | slurp)
PowerShell Setup
Add completion script to your PowerShell profile ($PROFILE):
leetrs completion powershell | Out-String | Invoke-Expression
Nushell Setup
Save completion script to your Nushell completions directory:
leetrs completion nushell | save -f ~/.config/nushell/completions/leetrs.nu
And add to your config.nu:
source ~/.config/nushell/completions/leetrs.nu
note
If you prefer use instead of source, make sure to include a trailing * (use ~/.config/nushell/completions/leetrs.nu *). Without *, Nushell treats the script as a module and namespaces the definitions under the file stem, causing an extra command prefix (leetrs leetrs).