diff --git a/etc/cli.yml b/etc/cli.yml index 93eed6cb..d86660ea 100644 --- a/etc/cli.yml +++ b/etc/cli.yml @@ -21,6 +21,12 @@ args: help: Set the runtime path required: false + - storename: + short: s + long: storename + help: Name of the store in the runtimepath. Defaults to "store" + required: false + subcommands: - cal: about: Calendar module diff --git a/src/cli.rs b/src/cli.rs index 2a4f25bc..42b8d563 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -41,6 +41,14 @@ impl<'a> CliConfig<'a> { pub fn get_rtp(&self) -> Option { self.cli_matches.value_of("rtp").and_then(|s| Some(String::from(s))) } + + pub fn store_path(&self) -> Option { + self.get_rtp().and_then(|rtp| { + self.cli_matches + .value_of("storepath") + .and_then(|s| Some(rtp + s)) + }) + } } impl<'a> Debug for CliConfig<'a> {