CLI Auto completion
tab shell completions
Users of the border0
CLI tool can enable shell completion, making it easier to work with border0
.
Shell autocompletion is supported for the following shells:
- bash
- zsh
- fish
- powershell
To generate the shell completion commands use:
border0 completion [bash|zsh|fish|powershell]
The output of this command should be written to file loaded by your shell.
Also see the complete help below.
After this you can use tab completion for interacting with the Border0 CLI 🚀🚀🚀
$ border0 completion --help
To load completions:
Bash:
$ source <(border0 completion bash)
# To load completions for each session, execute once:
# Linux:
$ border0 completion bash | sudo tee /etc/bash_completion.d/border0
# macOS:
$ border0 completion bash > /usr/local/etc/bash_completion.d/border0
Zsh:
# If shell completion is not already enabled in your environment,
# you will need to enable it. You can execute the following once:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
# To load completions for each session, execute once:
$ border0 completion zsh > "${fpath[1]}/_border0"
# You will need to start a new shell for this setup to take effect.
fish:
$ border0 completion fish | source
# To load completions for each session, execute once:
$ border0 completion fish > ~/.config/fish/completions/border0.fish
PowerShell:
PS> border0 completion powershell | Out-String | Invoke-Expression
# To load completions for every new session, run:
PS> border0 completion powershell > border0.ps1
# and source this file from your PowerShell profile.
Usage:
border0 completion [bash|zsh|fish|powershell]
Flags:
-h, --help help for completion
Now we have that pressing the tab key (represented as [tab]) twice displays the following completions:
Updated about 2 years ago