Skip to content

Commit

Permalink
refactor: minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
GetPsyched committed Jul 5, 2024
1 parent c9f1a7c commit 3dc79cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bin/todo/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ use clap_complete::{generate, Shell};

#[derive(Parser)]
pub struct Args {
#[clap(value_enum, help = "The shell to generate completions script for")]
#[clap(value_enum, help = "The shell to generate the completion script for")]
pub shell: Shell,
}

pub fn command(args: &Args) {
let mut cmd = crate::Args::command();
let bin_name = "todo";
generate(args.shell, &mut cmd, bin_name, &mut io::stdout());
let mut command = crate::Args::command();
let binary_name = command.get_name().to_string();
generate(args.shell, &mut command, binary_name, &mut io::stdout());
}
1 change: 1 addition & 0 deletions src/bin/todo/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mod show;
mod update;

#[derive(Parser)]
#[command(name = "todo")]
struct Args {
#[command(subcommand)]
command: Commands,
Expand Down

0 comments on commit 3dc79cb

Please sign in to comment.