Skip to main content

sc completion

Generate an autocompletion script for bash, zsh, fish and powershell shells. See each sub-command's help for details on how to use the generated script.

Usage

$ sc completion [OPTIONS]

Options

bash

Linux

sc completion bash > /etc/bash_completion.d/sc

macOS

sc completion bash > /usr/local/etc/bash_completion.d/sc

zsh

  1. If shell completion is not already enabled in your environment, enable it by executing the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrc
  1. To load completions for each session, execute once:
sc completion zsh > "${fpath[1]}/_sc"
  1. Start a new shell to apply this setup.

fish

sc completion fish | source

To load completions for each session, execute once:

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

Powershell

sc completion powershell | Out-String | Invoke-Expression

To load completions for every new session, run the following and then source this file from your Powershell profile:

sc completion powershell > sc.ps1

Additional Resources