Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Support nested subcommand #110

Closed
JunichiSugiura opened this issue Sep 12, 2022 · 0 comments · Fixed by #112
Closed

CLI: Support nested subcommand #110

JunichiSugiura opened this issue Sep 12, 2022 · 0 comments · Fixed by #112
Assignees
Labels
CLI dip_cli related enhancement New feature or request

Comments

@JunichiSugiura
Copy link
Member

JunichiSugiura commented Sep 12, 2022

#112

  • Subcommand -> SubcommandPlugin
  • generated subcommand plugin needs to be manually added
  • add subcommand name suffix to each event name
#[derive(SubcommandPlugin, clap::Subcommand, Clone)]
pub enum Action {
    // Named variant
    Hello { name: Option<String> },
    // Unnamed
    Hello2(Hello2Args),
    // Unit
    Ping,
    
    #[clap(subcommand)]
    Task(TaskAction)
}

#[derive(SubcommandPlugin, clap::Subcommand, Clone)]
pub enum TaskAction {
    Install,
}

// Generated Events

// HelloAction
// Hello2Action
// PingAction
// TaskAction
// InstallTaskAction
@JunichiSugiura JunichiSugiura self-assigned this Sep 12, 2022
@JunichiSugiura JunichiSugiura added enhancement New feature or request CLI dip_cli related labels Sep 12, 2022
@JunichiSugiura JunichiSugiura moved this to 🏗 In progress in 📌 dip - Project board Sep 12, 2022
@JunichiSugiura JunichiSugiura changed the title CLI: Accept crate name resolution CLI: Accept crate name resolution in proc macros Sep 12, 2022
@JunichiSugiura JunichiSugiura moved this from 🏗 In progress to 🔖 Ready in 📌 dip - Project board Sep 13, 2022
@JunichiSugiura JunichiSugiura changed the title CLI: Accept crate name resolution in proc macros CLI: Support nested subcommand Sep 13, 2022
@JunichiSugiura JunichiSugiura moved this from 🔖 Ready to 🏗 In progress in 📌 dip - Project board Sep 17, 2022
Repository owner moved this from 🏗 In progress to ✅ Done in 📌 dip - Project board Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI dip_cli related enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant