Skip to content

sm completion

Generate the autocompletion script for sm in the named shell.

Synopsis

sm completion <bash|zsh|fish|powershell>

Examples

Pick the tab for your shell. Each snippet is self-contained — pick one, paste, restart your shell.

zsh
sm completion zsh > "${fpath[1]}/_sm"
bash
sm completion bash > /etc/bash_completion.d/sm
fish
sm completion fish > ~/.config/fish/completions/sm.fish
powershell
sm completion powershell > sm.ps1
. ./sm.ps1

What it generates

A shell-specific script that wires:

  • Subcommand completion (e.g. sm cre<TAB>create).
  • Tracked-branch-name completion on sm checkout, sm parent, sm move, sm show.
  • Flag completion for every command (long flags, short flags, value enums where applicable).

Verifying

After installing, type sm checkout and press <Tab> — the list of tracked branches plus trunk should appear.

See also

Released under a license that is currently TBD.