Skip to content

Commit a0f78b2

Browse files
committed
refactor
- docs - greater conformance with examples
1 parent e919541 commit a0f78b2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ fn main() -> Result<()> {
143143
}
144144
Some(Completions { shell }) => {
145145
let mut cmd = options::Args::command();
146-
clap_complete::generate(shell, &mut cmd, "dua", &mut io::stdout());
146+
let dua = cmd.get_name().to_string();
147+
clap_complete::generate(shell, &mut cmd, dua, &mut io::stdout());
147148
return Ok(());
148149
}
149150
None => {

src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub enum Command {
126126
},
127127
/// Generate shell completions
128128
Completions {
129-
#[clap()]
129+
/// The shell to generate a completions-script for
130130
shell: Shell,
131131
},
132132
}

0 commit comments

Comments
 (0)