summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-04-14 14:15:00 +0200
committerMario Krehl <mario-krehl@gmx.de>2018-04-14 14:35:28 +0200
commitfb4917d050f9ec505d140ae0ea26916254fd9a15 (patch)
tree8746a90c29106352ed43ae8ec5f5f1dce05e569b /lib
parent24b0cadb8984ba877a1b9d3791d5fba1a1cfe291 (diff)
Remove feature to generate commandline completion scripts
Diffstat (limited to 'lib')
-rw-r--r--lib/core/libimagrt/src/runtime.rs28
1 files changed, 1 insertions, 27 deletions
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs
index c0e8488f..a51fe8c5 100644
--- a/lib/core/libimagrt/src/runtime.rs
+++ b/lib/core/libimagrt/src/runtime.rs
@@ -111,27 +111,14 @@ impl<'a> Runtime<'a> {
Runtime::_new(cli_app, matches, config)
}
- fn _new<C>(mut cli_app: C, matches: ArgMatches<'a>, config: Option<Value>)
+ fn _new<C>(cli_app: C, matches: ArgMatches<'a>, config: Option<Value>)
-> Result<Runtime<'a>, RuntimeError>
where C: Clone + CliSpec<'a> + InternalConfiguration
{
- use std::io::stdout;
- use clap::Shell;
-
if cli_app.enable_logging() {
Runtime::init_logger(&matches, config.as_ref())
}
- 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.
- let appname = String::from(cli_app.name());
- cli_app.completions(appname, shell, &mut stdout());
- },
- _ => debug!("Not generating shell completion script"),
- }
-
let rtp = get_rtp_match(&matches);
let storepath = matches.value_of(Runtime::arg_storepath_name())
@@ -242,14 +229,6 @@ impl<'a> Runtime<'a> {
.required(false)
.takes_value(true))
- .arg(Arg::with_name(Runtime::arg_generate_compl())
- .long("generate-commandline-completion")
- .help("Generate the commandline completion for bash or zsh or fish")
- .required(false)
- .takes_value(true)
- .value_name("SHELL")
- .possible_values(&["bash", "fish", "zsh"]))
-
.arg(Arg::with_name(Runtime::arg_logdest_name())
.long(Runtime::arg_logdest_name())
.help("Override the logging destinations from the configuration: values can be seperated by ',', a value of '-' marks the stderr output, everything else is expected to be a path")
@@ -320,11 +299,6 @@ impl<'a> Runtime<'a> {
"editor"
}
- /// Get the argument name for generating the completion
- pub fn arg_generate_compl() -> &'static str {
- "generate-completion"
- }
-
/// Extract the Store object from the Runtime object, destroying the Runtime object
///
/// # Warning