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:
parent
1196f5395d
commit
d5fd773da8
2 changed files with 6 additions and 6 deletions
|
@ -58,7 +58,7 @@ fn main() {
|
||||||
trace!("calling = {:?}", rt.cli().subcommand_name());
|
trace!("calling = {:?}", rt.cli().subcommand_name());
|
||||||
|
|
||||||
match 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("idof") => idof(&rt, wiki_name),
|
||||||
Some("create") => create(&rt, wiki_name),
|
Some("create") => create(&rt, wiki_name),
|
||||||
Some("create-wiki") => create_wiki(&rt),
|
Some("create-wiki") => create_wiki(&rt),
|
||||||
|
@ -75,9 +75,9 @@ fn main() {
|
||||||
} // end match scmd
|
} // end match scmd
|
||||||
} // end main
|
} // end main
|
||||||
|
|
||||||
fn ids(rt: &Runtime, wiki_name: &str) {
|
fn list(rt: &Runtime, wiki_name: &str) {
|
||||||
let scmd = rt.cli().subcommand_matches("ids").unwrap(); // safed by clap
|
let scmd = rt.cli().subcommand_matches("list").unwrap(); // safed by clap
|
||||||
let prefix = if scmd.is_present("ids-full") {
|
let prefix = if scmd.is_present("list-full") {
|
||||||
format!("{}/", rt.store().path().display())
|
format!("{}/", rt.store().path().display())
|
||||||
} else {
|
} else {
|
||||||
String::from("")
|
String::from("")
|
||||||
|
|
|
@ -30,11 +30,11 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
|
||||||
.value_name("WIKI")
|
.value_name("WIKI")
|
||||||
.help("Name of the wiki to use. Defaults to 'default'"))
|
.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")
|
.about("List all ids in this wiki")
|
||||||
.version("0.1")
|
.version("0.1")
|
||||||
|
|
||||||
.arg(Arg::with_name("ids-full")
|
.arg(Arg::with_name("list-full")
|
||||||
.long("full")
|
.long("full")
|
||||||
.takes_value(false)
|
.takes_value(false)
|
||||||
.required(false)
|
.required(false)
|
||||||
|
|
Loading…
Reference in a new issue