ggen_cli_lib/cmds/shell/
mod.rs

1use clap::{Args, Subcommand};
2use ggen_utils::error::Result;
3
4// Declare verb modules
5// pub mod completion; // COMMENTED OUT: Command line completion code
6pub mod init;
7
8#[derive(Args, Debug)]
9pub struct ShellCmd {
10    #[command(subcommand)]
11    pub verb: Verb,
12}
13
14#[derive(Subcommand, Debug)]
15pub enum Verb {
16    // /// Generate shell completion scripts // COMMENTED OUT: Command line completion code
17    // Completion(completion::CompletionArgs),
18    /// Initialize shell integration
19    Init(init::InitArgs),
20}
21
22impl ShellCmd {
23    pub async fn run(&self) -> Result<()> {
24        match &self.verb {
25            // Verb::Completion(args) => completion::run(args).await, // COMMENTED OUT: Command line completion code
26            Verb::Init(args) => init::run(args).await,
27        }
28    }
29}