Skip to content

Shell Completions

Scion provides shell completions for bash, zsh, fish, and powershell.

If you have installed scion and want to enable completions:

  1. Generate the completion script:
    Terminal window
    scion completion zsh > _scion
  2. Move the file to a directory in your $fpath.

For macOS users: If you are using Homebrew, you likely already have a configured site-functions directory. If you do not use Homebrew or prefer a manual setup:

  1. Create the directory if it doesn’t exist:
    Terminal window
    sudo mkdir -p /usr/local/share/zsh/site-functions
  2. Move the completion file:
    Terminal window
    sudo mv _scion /usr/local/share/zsh/site-functions/
  3. Ensure that directory is in your $fpath in your ~/.zshrc (usually added automatically, but verify if completions don’t work):
    Terminal window
    # in ~/.zshrc
    fpath=(/usr/local/share/zsh/site-functions $fpath)
    autoload -U compinit; compinit

To load completions for the current session:

Terminal window
source <(scion completion bash)

To load completions for each session, execute once:

Terminal window
# Linux:
scion completion bash > /etc/bash_completion.d/scion
# macOS:
scion completion bash > /usr/local/etc/bash_completion.d/scion