bash
The stackgen completion bash
command generates an autocompletion script for Bash shell. This allows you to use the TAB key to complete StackGen commands, flags, and arguments in Bash.
Usage
stackgen completion bash [flags]
Flags
Flag | Description |
---|---|
-h, --help | Help for bash |
--no-descriptions | Disable completion descriptions |
Examples
Generate the autocompletion script
stackgen completion bash > ~/.stackgen-completion.bash
This command will:
- Generate the Bash completion script
- Save it to a file in your home directory
Add the completion script to your .bashrc file
echo "source ~/.stackgen-completion.bash" >> ~/.bashrc
This command will:
- Add a line to your .bashrc file that sources the completion script
- Enable StackGen autocompletion for all new Bash sessions
Load the completion script in your current session
source ~/.stackgen-completion.bash
This command will:
- Load the completion script in your current Bash session
- Immediately enable StackGen autocompletion without needing to start a new shell
note
- The generated script must be sourced in your shell configuration to enable completions
- For temporary use, you can pipe the output directly to a source command:
source <(stackgen completion bash)
- If you update the StackGen CLI, you may need to regenerate the completion script