We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eab22bd commit 7f2bc08Copy full SHA for 7f2bc08
src/plumbing/main.rs
@@ -1222,12 +1222,11 @@ pub fn main() -> Result<()> {
1222
Subcommands::Completions { shell, out_dir } => {
1223
let mut app = Args::command();
1224
1225
- let bin_name = "gix";
1226
- app.set_bin_name(bin_name);
1227
-
1228
let shell = shell
1229
.or_else(clap_complete::Shell::from_env)
1230
.ok_or_else(|| anyhow!("The shell could not be derived from the environment"))?;
+
+ let bin_name = app.get_name().to_owned();
1231
if let Some(out_dir) = out_dir {
1232
clap_complete::generate_to(shell, &mut app, bin_name, &out_dir)?;
1233
} else {
0 commit comments