src completion

Generate shell completion scripts for src.

To load completions:

Bash:
$ source <(src completion bash)

To load completions for each session, execute once:

Linux:

$ src completion bash > /etc/bash_completion.d/src

macOS:

$ src completion bash > $(brew --prefix)/etc/bash_completion.d/src

Zsh:

If shell completion is not already enabled in your environment,

you will need to enable it. You can execute the following once:

$ echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions for each session, execute once:

$ sc completion zsh > "${fpath[1]}/_sc"

You will need to start a new shell for this setup to take effect.

Fish:
$ sc completion fish | source

To load completions for each session, execute once:

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

Usage

src completion <shell> [flags]

Available commands

Command Description
bash Generate bash completion script
fish Generate fish completion script
zsh Generate zsh completion script

Inherited flags

Flag Description
--env string Override Sourcecraft environment (use 'src envs' to list available)
--json string Output JSON, optionally filtered (--json or --json=field1,field2)
--json-compact string Output compact JSON, optionally filtered
--plain Output without colors/styling (for LLM consumption)
-R, --repo string Select another repository using OWNER/REPO format
-V, --verbose Enable debug logging output

Learn more

Use src completion <subcommand> --help for more information about a command.

Предыдущая
Следующая