summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-07-25 19:58:29 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-07-25 19:59:01 +0200
commitd5fd773da813832f93ee8bec59427b7b248d7373 (patch)
tree18349173d7d6c5240838fea19927ab387db09391 /bin
parent1196f5395d90bbd43bef9e12007c6587138a4d05 (diff)
Change imag-wiki interface to be consistent with other commands
Use "list" instead of "ids" for listing ids in a wiki. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin')
-rw-r--r--bin/domain/imag-wiki/src/main.rs8
-rw-r--r--bin/domain/imag-wiki/src/ui.rs4
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/domain/imag-wiki/src/main.rs b/bin/domain/imag-wiki/src/main.rs
index b0a5bff8..8bdb7c4f 100644
--- a/bin/domain/imag-wiki/src/main.rs
+++ b/bin/domain/imag-wiki/src/main.rs
@@ -58,7 +58,7 @@ fn main() {
trace!("calling = {:?}", rt.cli().subcommand_name());
match rt.cli().subcommand_name() {
- Some("ids") => ids(&rt, wiki_name),
+ Some("list") => list(&rt, wiki_name),
Some("idof") => idof(&rt, wiki_name),
Some("create") => create(&rt, wiki_name),
Some("create-wiki") => create_wiki(&rt),
@@ -75,9 +75,9 @@ fn main() {
} // end match scmd
} // end main
-fn ids(rt: &Runtime, wiki_name: &str) {
- let scmd = rt.cli().subcommand_matches("ids").unwrap(); // safed by clap
- let prefix = if scmd.is_present("ids-full") {
+fn list(rt: &Runtime, wiki_name: &str) {
+ let scmd = rt.cli().subcommand_matches("list").unwrap(); // safed by clap
+ let prefix = if scmd.is_present("list-full") {
format!("{}/", rt.store().path().display())
} else {
String::from("")
diff --git a/bin/domain/imag-wiki/src/ui.rs b/bin/domain/imag-wiki/src/ui.rs
index ec004237..3929de35 100644
--- a/bin/domain/imag-wiki/src/ui.rs
+++ b/bin/domain/imag-wiki/src/ui.rs
@@ -30,11 +30,11 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.value_name("WIKI")
.help("Name of the wiki to use. Defaults to 'default'"))
- .subcommand(SubCommand::with_name("ids")
+ .subcommand(SubCommand::with_name("list")
.about("List all ids in this wiki")
.version("0.1")
- .arg(Arg::with_name("ids-full")
+ .arg(Arg::with_name("list-full")
.long("full")
.takes_value(false)
.required(false)