summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-11-02 13:22:58 +0100
committerMatthias Beyer <mail@beyermatthias.de>2016-11-02 14:37:45 +0100
commitdc196793e9780e2319a620d3cc099b8b96c75bef (patch)
treec827066098524fefcfcdb8cdaa2275a266fe6464
parent17f42fd5e45784295bc56e18ade158ad5e6bcbf5 (diff)
downloadimag-dc196793e9780e2319a620d3cc099b8b96c75bef.tar.gz
imag-dc196793e9780e2319a620d3cc099b8b96c75bef.tar.xz
-rw-r--r--libimagrt/src/runtime.rs5
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"),
}