Skip to main content

completion

Install tab completion for Bash, Zsh, or Fish:

magic completion [bash|zsh|fish]

When the shell is omitted, the CLI detects it. Installation asks before changing shell configuration. Restart your shell after installing completions.

FlagRequiredDescription
--printNoPrint the completion script without changing shell configuration.
--path <PATH>NoAlso add an absolute directory to your shell's PATH. Cannot be combined with --print.
--yesNoAllow shell configuration changes without prompting. Cannot be combined with --print.

To print a script for manual setup:

magic completion zsh --print