completion
Generate shell completion scripts for LeapSQL.
To load completions:
Bash: $ source <(leapsql completion bash)
To load completions for each session, execute once:
Linux:
$ leapsql completion bash > /etc/bash_completion.d/leapsql
macOS:
$ leapsql completion bash > $(brew --prefix)/etc/bash_completion.d/leapsql
Zsh:
If shell completion is not already enabled in your environment,
you will need to enable it. Execute the following once:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions for each session, execute once:
$ leapsql completion zsh > "${fpath[1]}/_leapsql"
You will need to start a new shell for this setup to take effect.
Fish: $ leapsql completion fish | source
To load completions for each session, execute once:
$ leapsql completion fish > ~/.config/fish/completions/leapsql.fish
PowerShell: PS> leapsql completion powershell | Out-String | Invoke-Expression
To load completions for every new session, run:
PS> leapsql completion powershell > leapsql.ps1
and source this file from your PowerShell profile.
Usage
bash
leapsql completion [bash|zsh|fish|powershell]Global Options
| Option | Short | Default | Description |
|---|---|---|---|
--config | config file (default: ./leapsql.yaml) | ||
--database | Path to DuckDB database (empty for in-memory) | ||
--env | Environment name | ||
--macros-dir | Path to macros directory | ||
--models-dir | Path to models directory | ||
--output | -o | Output format (auto|text|markdown|json) | |
--project-dir | -C | Project root directory (auto-detected from models-dir or config file location) | |
--seeds-dir | Path to seeds directory | ||
--state | Path to state database | ||
--target | -t | Target environment to use (e.g., dev, staging, prod) | |
--verbose | -v | false | Verbose output |