Skip to main content

Auto Complete

Documentation for the slv completion command.

Set up Command Auto Complete

Hitting tab would auto complete the command for you within the slv command.

General Usage:

slv completion [command]

Commands Available:

Bash

On bash versions > 4,

source <(slv completion bash)

You are likely to be using an older bash version only if you are using MacOS's default bash (3.2.x) In that case, you can run

slv completion bash > /tmp/slvcomp.sh && source /tmp/slvcomp.sh && rm /tmp/slvcomp.sh

You can add either of the lines to ~/.bashrc to automatically set up auto complete everytime.


Fish

In Fish, the auto completion script can be added to the auto completions path.

slv completion fish > ~/.config/fish/completions/slv.fish

The completions can be loaded using the following command. Alternatively, you can spawn a new fish shell.

. ~/.config/fish/config.fish

Powershell

To enable auto completion temporarily for the current session,

slv completion powershell | Out-String | Invoke-Expression


Alternatively, auto completion can be enabled persistently.

slv completion powershell > $PROFILE.d/slv-completion.ps1

Add the following line to the PowerShell Profile

Add-Content -Path $PROFILE -Value ". `$PROFILE.d/slv-completion.ps1"

Reload

. $PROFILE

Zsh

The following commands will load the Zsh completion system. Ensure that these commands are either run or present on top of ~/.zshrc before the auto completion script sourcing.

autoload -Uz compinit
compinit

Now you can either run the following command or add it to ~/.zshrc for SLV Auto Completion.

source <(slv completion bash)