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>
This commit is contained in:
Matthias Beyer 2019-07-25 19:58:29 +02:00
parent 1196f5395d
commit d5fd773da8
2 changed files with 6 additions and 6 deletions

View file

@ -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("")

View file

@ -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)