Skip to content

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

OptionShortDefaultDescription
--configconfig file (default: ./leapsql.yaml)
--databasePath to DuckDB database (empty for in-memory)
--envEnvironment name
--macros-dirPath to macros directory
--models-dirPath to models directory
--output-oOutput format (auto|text|markdown|json)
--project-dir-CProject root directory (auto-detected from models-dir or config file location)
--seeds-dirPath to seeds directory
--statePath to state database
--target-tTarget environment to use (e.g., dev, staging, prod)
--verbose-vfalseVerbose output

Released under the MIT License.