Pass real app name

This commit is contained in:
Matthias Beyer 2016-11-02 13:22:58 +01:00
parent 17f42fd5e4
commit dc196793e9

View file

@ -86,7 +86,8 @@ impl<'a> Runtime<'a> {
Some(shell) => { Some(shell) => {
debug!("Generating shell completion script, writing to stdout"); debug!("Generating shell completion script, writing to stdout");
let shell = shell.parse::<Shell>().unwrap(); // clap has our back here. let shell = shell.parse::<Shell>().unwrap(); // clap has our back here.
cli_spec.gen_completions_to("fakename", shell, &mut stdout()); let appname = String::from(cli_spec.get_name());
cli_spec.gen_completions_to(appname, shell, &mut stdout());
}, },
_ => debug!("Not generating shell completion script"), _ => debug!("Not generating shell completion script"),
} }