add about for the help
This commit is contained in:
parent
8173bbc7d5
commit
ed599d1399
55
src/main.rs
55
src/main.rs
@ -8,30 +8,11 @@ mod global;
|
|||||||
mod store;
|
mod store;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let matches = App::new("NextSync")
|
let matches = App::new("Nextsync")
|
||||||
.version("1.0")
|
.version("1.0")
|
||||||
.author("grimhilt")
|
.author("grimhilt")
|
||||||
.about("")
|
.about("A git-line command line tool to interact with nextcloud")
|
||||||
.subcommand(
|
.setting(clap::AppSettings::SubcommandRequiredElseHelp)
|
||||||
SubCommand::with_name("init")
|
|
||||||
.arg(
|
|
||||||
Arg::with_name("directory")
|
|
||||||
.required(false)
|
|
||||||
.takes_value(true)
|
|
||||||
.value_name("DIRECTORY")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.subcommand(
|
|
||||||
SubCommand::with_name("status")
|
|
||||||
.arg(
|
|
||||||
Arg::with_name("directory")
|
|
||||||
.required(false)
|
|
||||||
.takes_value(true)
|
|
||||||
.value_name("DIRECTORY")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.subcommand(SubCommand::with_name("reset"))
|
|
||||||
.subcommand(SubCommand::with_name("push"))
|
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("clone")
|
SubCommand::with_name("clone")
|
||||||
.arg(
|
.arg(
|
||||||
@ -46,6 +27,35 @@ fn main() {
|
|||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.value_name("DIRECTORY")
|
.value_name("DIRECTORY")
|
||||||
)
|
)
|
||||||
|
.about("Clone a repository into a new directory")
|
||||||
|
)
|
||||||
|
.subcommand(
|
||||||
|
SubCommand::with_name("init")
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("directory")
|
||||||
|
.required(false)
|
||||||
|
.takes_value(true)
|
||||||
|
.value_name("DIRECTORY")
|
||||||
|
)
|
||||||
|
.about("Create an empty Nextsync repository") // Create an empty Git repository or reinitialize an existing one
|
||||||
|
)
|
||||||
|
.subcommand(
|
||||||
|
SubCommand::with_name("status")
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("directory")
|
||||||
|
.required(false)
|
||||||
|
.takes_value(true)
|
||||||
|
.value_name("DIRECTORY")
|
||||||
|
)
|
||||||
|
.about("Show the working tree status")
|
||||||
|
)
|
||||||
|
.subcommand(
|
||||||
|
SubCommand::with_name("reset")
|
||||||
|
.about("Clear the index")
|
||||||
|
)
|
||||||
|
.subcommand(
|
||||||
|
SubCommand::with_name("push")
|
||||||
|
.about("Push changes on nextcloud")
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("add")
|
SubCommand::with_name("add")
|
||||||
@ -63,6 +73,7 @@ fn main() {
|
|||||||
.long("force")
|
.long("force")
|
||||||
.help("Allow adding otherwise ignored files."),
|
.help("Allow adding otherwise ignored files."),
|
||||||
)
|
)
|
||||||
|
.about("Add changes to the index")
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
SubCommand::with_name("config")
|
SubCommand::with_name("config")
|
||||||
|
Loading…
Reference in New Issue
Block a user