-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Labels
Description
Problem Statement
Sqitch has a rich CLI with multiple subcommands (deploy
, revert
, log
, etc.) and options. However, it currently lacks built-in shell completion, making command discovery and usage slower. Users must manually type full command names, database URIs, and change names without suggestions.
Proposed Solution
Implement shell completion scripts for popular shells:
- Bash (
sqitch-completion.bash
) - Zsh (
_sqitch
) - Fish (
sqitch.fish
)
The completion should:
- Suggest Sqitch subcommands (
deploy
,revert
,log
, etc.). - Auto-complete options (e.g.,
--target
,--to
). - Suggest change names from
sqitch.plan
. - (Optional) Auto-complete database URIs from a config file.
Implementation
Many CLI tools generate completion scripts dynamically (e.g., Git, Docker). Sqitch could provide:
- A
sqitch completion <shell>
command to output the completion script. - Installation instructions for different shells.
Benefits
- Faster command execution with fewer typos.
- Easier onboarding for new users.
- Improved developer experience when working with many changes.
Would this be useful for others? Feedback is welcome!
theory and dmunozv04