Remove use of Runtime functions, hardcode strings

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-07-26 23:20:28 +02:00
parent 6ac6db57d1
commit f1e14a0d46
1 changed files with 10 additions and 27 deletions

View File

@ -201,7 +201,7 @@ fn main() {
exit(1) exit(1)
}); });
let configpath = matches let configpath = matches
.value_of(Runtime::arg_config_name()) .value_of("config")
.map_or_else(|| rtp.clone(), PathBuf::from); .map_or_else(|| rtp.clone(), PathBuf::from);
debug!("Config path = {:?}", configpath); debug!("Config path = {:?}", configpath);
let config = ::libimagrt::configuration::fetch_config(&configpath) let config = ::libimagrt::configuration::fetch_config(&configpath)
@ -406,31 +406,14 @@ fn forward_commandline_arguments(m: &ArgMatches, scmd: &mut Vec<String>) {
} }
}; };
push(Some("verbose"), push(Some("verbose"), "verbosity", m , scmd);
Runtime::arg_verbosity_name(), m , scmd); push(Some("debug"), "debugging", m , scmd);
push(Some("no-color"), "no-color-output", m , scmd);
push(Some("debug"), push(Some("config"), "config", m , scmd);
Runtime::arg_debugging_name(), m , scmd); push(Some("override-config"), "config-override", m , scmd);
push(Some("rtp"), "runtimepath", m , scmd);
push(Some("no-color"), push(Some("store"), "storepath", m , scmd);
Runtime::arg_no_color_output_name(), m , scmd); push(Some("editor"), "editor", m , scmd);
push(Some("ignore-ids"), "ignore-ids", m , scmd);
push(Some("config"),
Runtime::arg_config_name(), m , scmd);
push(Some("override-config"),
Runtime::arg_config_override_name(), m , scmd);
push(Some("rtp"),
Runtime::arg_runtimepath_name(), m , scmd);
push(Some("store"),
Runtime::arg_storepath_name(), m , scmd);
push(Some("editor"),
Runtime::arg_editor_name(), m , scmd);
push(Some("ignore-ids"),
Runtime::arg_ignore_ids_name(), m , scmd);
} }