refactor folder with clap derive api

This commit is contained in:
Clément DOUIN
2023-12-06 21:46:31 +01:00
parent abe4c7f4ea
commit 4a77253c1d
29 changed files with 446 additions and 114 deletions
+4 -4
View File
@@ -6,15 +6,15 @@ use std::io;
use crate::{cli::Cli, printer::Printer};
/// Print completion script for the given shell to stdout
/// Print completion script for a shell to stdout
#[derive(Debug, Parser)]
pub struct Command {
/// Shell that completion script should be generated for
pub struct CompletionGenerateCommand {
/// Shell for which completion script should be generated for
#[arg(value_parser = value_parser!(Shell))]
pub shell: Shell,
}
impl Command {
impl CompletionGenerateCommand {
pub async fn execute(self, printer: &mut impl Printer) -> Result<()> {
info!("executing completion generate command");