diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-11-02 13:22:58 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-11-02 14:37:45 +0100 |
commit | dc196793e9780e2319a620d3cc099b8b96c75bef (patch) | |
tree | c827066098524fefcfcdb8cdaa2275a266fe6464 /libimagrt | |
parent | 17f42fd5e45784295bc56e18ade158ad5e6bcbf5 (diff) |
Pass real app name
Diffstat (limited to 'libimagrt')
-rw-r--r-- | libimagrt/src/runtime.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libimagrt/src/runtime.rs b/libimagrt/src/runtime.rs index a1ff47a7..b821e66d 100644 --- a/libimagrt/src/runtime.rs +++ b/libimagrt/src/runtime.rs @@ -85,8 +85,9 @@ impl<'a> Runtime<'a> { match matches.value_of(Runtime::arg_generate_compl()) { Some(shell) => { debug!("Generating shell completion script, writing to stdout"); - let shell = shell.parse::<Shell>().unwrap(); // clap has our back here. - cli_spec.gen_completions_to("fakename", shell, &mut stdout()); + let shell = shell.parse::<Shell>().unwrap(); // clap has our back here. + let appname = String::from(cli_spec.get_name()); + cli_spec.gen_completions_to(appname, shell, &mut stdout()); }, _ => debug!("Not generating shell completion script"), } |