diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-21 23:50:43 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-21 23:50:43 +0900 |
| commit | b5af594fec7da72b15c9a202c641af0494db6355 (patch) | |
| tree | 21f71831c8c638d14c538aebda93015e3bc484ae /crates/mozart/src/commands.rs | |
| parent | 00dee137280be358ab9b40c6cff9af6efba1f17d (diff) | |
| download | php-mozart-b5af594fec7da72b15c9a202c641af0494db6355.tar.gz php-mozart-b5af594fec7da72b15c9a202c641af0494db6355.tar.zst php-mozart-b5af594fec7da72b15c9a202c641af0494db6355.zip | |
feat(completion): add shell completion generation via clap_complete
Add a `completion` subcommand that generates shell completion scripts
for Bash, Zsh, Fish, Elvish, and PowerShell using the clap_complete
crate.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands.rs')
| -rw-r--r-- | crates/mozart/src/commands.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/mozart/src/commands.rs b/crates/mozart/src/commands.rs index 694b4e1..285f65d 100644 --- a/crates/mozart/src/commands.rs +++ b/crates/mozart/src/commands.rs @@ -5,6 +5,7 @@ pub mod browse; pub mod bump; pub mod check_platform_reqs; pub mod clear_cache; +pub mod completion; pub mod config; pub mod create_project; pub mod dependency; @@ -105,6 +106,9 @@ pub enum Commands { #[command(name = "clear-cache", alias = "clearcache", alias = "cc")] ClearCache(clear_cache::ClearCacheArgs), + /// Generate shell completion scripts + Completion(completion::CompletionArgs), + /// Sets config options Config(config::ConfigArgs), @@ -203,6 +207,7 @@ pub fn execute(cli: &Cli) -> anyhow::Result<()> { Commands::Bump(args) => bump::execute(args, cli, &console), Commands::CheckPlatformReqs(args) => check_platform_reqs::execute(args, cli, &console), Commands::ClearCache(args) => clear_cache::execute(args, cli, &console), + Commands::Completion(args) => completion::execute(args, cli, &console), Commands::Config(args) => config::execute(args, cli, &console), Commands::CreateProject(args) => create_project::execute(args, cli, &console), Commands::Depends(args) => depends::execute(args, cli, &console), |
