completions
console2svg completions generate <shell>completions is a subcommand for generating command-line autocompletion scripts for various shells.
It enables quick tab completion for subcommand names, option flags, and argument candidates.
Subcommands and Arguments
Section titled “Subcommands and Arguments”generate <shell>
Section titled “generate <shell>”Outputs the completion definition code for the specified shell to standard output.
The <shell> argument accepts the following shell names:
bashzshfishpwsh(PowerShell)
Configuration Examples by Shell
Section titled “Configuration Examples by Shell”Loading the generated script into your shell configuration file enables autocompletion for subsequent shell sessions.
console2svg completions generate bash > ~/.console2svg.bashecho "source ~/.console2svg.bash" >> ~/.bashrcPlace the script in a completion functions directory (fpath):
mkdir -p ~/.zsh/completionsconsole2svg completions generate zsh > ~/.zsh/completions/_console2svgAdd the following to ~/.zshrc (before calling compinit):
fpath=(~/.zsh/completions $fpath)autoload -Uz compinit && compinitconsole2svg completions generate fish > ~/.config/fish/completions/console2svg.fishPowerShell
Section titled “PowerShell”console2svg completions generate pwsh >> $PROFILE