completion
command
Syntax: hakutest completion [bash|zsh|fish|powershell]
The hakutest completion
command is used for generating completion scripts for your shell.
Usage
It is recommended to save the autocompletion script to a file and then execute it in the shell profile:
-
Generate autocompletion scripts for your shell as follows:
hakutest completion [bash|zsh|fish|powershell] > _hakutest
-
Move the created file to the completions folder (if any):
mv _hakutest ~/path/to/completion/folder
-
Enable completion script in your shell profile. Below are instructions for each supported shell:
-
Bash: Add the following line to your
~/.bashrc
or~/.bash_profile
:source ~/path/to/completion/folder/_hakutest
-
Zsh: Add the following line to your
~/.zshrc
:source ~/path/to/completion/folder/_hakutest
-
Fish: Run the following command:
source ~/path/to/completion/folder/_hakutest
-
PowerShell: Add the following line to your
$PROFILE
:. ~/path/to/completion/folder/_hakutest
-
Alternatively, you may generate the completion script dynamically, though it will be slower than the prior method as the scripts will be generated each time you log in to a shell. It is also important to add the installation folder of hakutest to your $PATH
:
-
Bash: Add the following line to your
~/.bashrc
or~/.bash_profile
:source <(hakutest completion bash)
-
Zsh: Add the following line to your
~/.zshrc
:source <(hakutest completion zsh)
-
Fish: Run the following command:
hakutest completion fish | source
-
PowerShell: Add the following line to your
$PROFILE
:hakutest completion powershell | Out-String | Invoke-Expression