diff --git a/radicle-cli/src/commands/assign.rs b/radicle-cli/src/commands/assign.rs index c480a90a..db91da96 100644 --- a/radicle-cli/src/commands/assign.rs +++ b/radicle-cli/src/commands/assign.rs @@ -48,7 +48,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Long("to") => { diff --git a/radicle-cli/src/commands/auth.rs b/radicle-cli/src/commands/auth.rs index b63d0717..13bab7f3 100644 --- a/radicle-cli/src/commands/auth.rs +++ b/radicle-cli/src/commands/auth.rs @@ -61,7 +61,7 @@ impl Args for Options { Long("stdin") => { stdin = true; } - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } _ => return Err(anyhow::anyhow!(arg.unexpected())), diff --git a/radicle-cli/src/commands/checkout.rs b/radicle-cli/src/commands/checkout.rs index dd33717e..311512b9 100644 --- a/radicle-cli/src/commands/checkout.rs +++ b/radicle-cli/src/commands/checkout.rs @@ -49,7 +49,7 @@ impl Args for Options { Long("no-confirm") => { // Ignored for now. } - Long("help") => return Err(Error::Help.into()), + Long("help") | Short('h') => return Err(Error::Help.into()), Long("remote") => { let val = parser.value().unwrap(); remote = Some(term::args::did(&val)?); diff --git a/radicle-cli/src/commands/clone.rs b/radicle-cli/src/commands/clone.rs index dbfb77f1..9f4edbd6 100644 --- a/radicle-cli/src/commands/clone.rs +++ b/radicle-cli/src/commands/clone.rs @@ -74,7 +74,7 @@ impl Args for Options { Long("announce") => { announce = true; } - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(val) if id.is_none() => { diff --git a/radicle-cli/src/commands/comment.rs b/radicle-cli/src/commands/comment.rs index 4b36c9ec..0325f199 100644 --- a/radicle-cli/src/commands/comment.rs +++ b/radicle-cli/src/commands/comment.rs @@ -66,7 +66,7 @@ impl Args for Options { } // Common. - Long("help") => return Err(Error::Help.into()), + Long("help") | Short('h') => return Err(Error::Help.into()), Value(val) if id.is_none() => { let val = string(&val); diff --git a/radicle-cli/src/commands/delegate.rs b/radicle-cli/src/commands/delegate.rs index 8438b360..60d1fe79 100644 --- a/radicle-cli/src/commands/delegate.rs +++ b/radicle-cli/src/commands/delegate.rs @@ -68,7 +68,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Long("to") => { diff --git a/radicle-cli/src/commands/edit.rs b/radicle-cli/src/commands/edit.rs index 2e8e8d39..2e82b9f9 100644 --- a/radicle-cli/src/commands/edit.rs +++ b/radicle-cli/src/commands/edit.rs @@ -40,7 +40,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(val) if id.is_none() => { diff --git a/radicle-cli/src/commands/fork.rs b/radicle-cli/src/commands/fork.rs index 5ba3b304..fb54e13a 100644 --- a/radicle-cli/src/commands/fork.rs +++ b/radicle-cli/src/commands/fork.rs @@ -38,7 +38,7 @@ impl Args for Options { if let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(val) if rid.is_none() => { diff --git a/radicle-cli/src/commands/help.rs b/radicle-cli/src/commands/help.rs index cac16096..57d34254 100644 --- a/radicle-cli/src/commands/help.rs +++ b/radicle-cli/src/commands/help.rs @@ -51,7 +51,7 @@ impl Args for Options { if let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } _ => return Err(anyhow::anyhow!(arg.unexpected())), diff --git a/radicle-cli/src/commands/id.rs b/radicle-cli/src/commands/id.rs index 52329bb1..aad8efe2 100644 --- a/radicle-cli/src/commands/id.rs +++ b/radicle-cli/src/commands/id.rs @@ -133,7 +133,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Long("title") if op == Some(OperationName::Edit) => { diff --git a/radicle-cli/src/commands/init.rs b/radicle-cli/src/commands/init.rs index 6c231948..dd1c0fee 100644 --- a/radicle-cli/src/commands/init.rs +++ b/radicle-cli/src/commands/init.rs @@ -132,7 +132,7 @@ impl Args for Options { Long("verbose") | Short('v') => { verbose = true; } - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(val) if path.is_none() => { diff --git a/radicle-cli/src/commands/inspect.rs b/radicle-cli/src/commands/inspect.rs index df564454..95ddf845 100644 --- a/radicle-cli/src/commands/inspect.rs +++ b/radicle-cli/src/commands/inspect.rs @@ -65,7 +65,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Long("refs") => { diff --git a/radicle-cli/src/commands/issue.rs b/radicle-cli/src/commands/issue.rs index 618c73b7..6aad2654 100644 --- a/radicle-cli/src/commands/issue.rs +++ b/radicle-cli/src/commands/issue.rs @@ -135,7 +135,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Long("all") if op.is_none() || op == Some(OperationName::List) => { diff --git a/radicle-cli/src/commands/ls.rs b/radicle-cli/src/commands/ls.rs index 6664a524..018d4c86 100644 --- a/radicle-cli/src/commands/ls.rs +++ b/radicle-cli/src/commands/ls.rs @@ -36,7 +36,7 @@ impl Args for Options { if let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Long("verbose") | Short('v') => verbose = true, diff --git a/radicle-cli/src/commands/node.rs b/radicle-cli/src/commands/node.rs index e89e57aa..14b883a3 100644 --- a/radicle-cli/src/commands/node.rs +++ b/radicle-cli/src/commands/node.rs @@ -122,7 +122,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(val) if op.is_none() => match val.to_string_lossy().as_ref() { diff --git a/radicle-cli/src/commands/patch.rs b/radicle-cli/src/commands/patch.rs index fae468ec..5e5cd7c9 100644 --- a/radicle-cli/src/commands/patch.rs +++ b/radicle-cli/src/commands/patch.rs @@ -251,7 +251,7 @@ impl Args for Options { Long("verbose") | Short('v') => { verbose = true; } - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } diff --git a/radicle-cli/src/commands/path.rs b/radicle-cli/src/commands/path.rs index 839eee0e..a6a5fcb4 100644 --- a/radicle-cli/src/commands/path.rs +++ b/radicle-cli/src/commands/path.rs @@ -37,7 +37,7 @@ impl Args for Options { #[allow(clippy::never_loop)] while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } _ => return Err(anyhow!(arg.unexpected())), diff --git a/radicle-cli/src/commands/remote.rs b/radicle-cli/src/commands/remote.rs index bc9f3d77..e06dd440 100644 --- a/radicle-cli/src/commands/remote.rs +++ b/radicle-cli/src/commands/remote.rs @@ -67,7 +67,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(args::Error::Help.into()); } Long("name") | Short('n') => { diff --git a/radicle-cli/src/commands/review.rs b/radicle-cli/src/commands/review.rs index fde25fd4..5783acae 100644 --- a/radicle-cli/src/commands/review.rs +++ b/radicle-cli/src/commands/review.rs @@ -103,7 +103,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Long("revision") | Short('r') => { diff --git a/radicle-cli/src/commands/rm.rs b/radicle-cli/src/commands/rm.rs index b010f829..0ac592be 100644 --- a/radicle-cli/src/commands/rm.rs +++ b/radicle-cli/src/commands/rm.rs @@ -49,7 +49,7 @@ impl Args for Options { Long("no-confirm") => { confirm = false; } - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(val) if id.is_none() => { diff --git a/radicle-cli/src/commands/self.rs b/radicle-cli/src/commands/self.rs index 563cc37a..f68f1ebb 100644 --- a/radicle-cli/src/commands/self.rs +++ b/radicle-cli/src/commands/self.rs @@ -71,7 +71,7 @@ impl Args for Options { Long("ssh-fingerprint") if show.is_none() => { show = Some(Show::SshFingerprint); } - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } _ => return Err(anyhow::anyhow!(arg.unexpected())), diff --git a/radicle-cli/src/commands/sync.rs b/radicle-cli/src/commands/sync.rs index 409c2c65..3600e1d8 100644 --- a/radicle-cli/src/commands/sync.rs +++ b/radicle-cli/src/commands/sync.rs @@ -96,7 +96,7 @@ impl Args for Options { timeout = time::Duration::from_secs(secs); } - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(val) if rid.is_none() => { diff --git a/radicle-cli/src/commands/tag.rs b/radicle-cli/src/commands/tag.rs index b0a0ddf3..c149b874 100644 --- a/radicle-cli/src/commands/tag.rs +++ b/radicle-cli/src/commands/tag.rs @@ -44,7 +44,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(ref val) if id.is_none() => { diff --git a/radicle-cli/src/commands/track.rs b/radicle-cli/src/commands/track.rs index 08e56ded..ce018084 100644 --- a/radicle-cli/src/commands/track.rs +++ b/radicle-cli/src/commands/track.rs @@ -91,7 +91,7 @@ impl Args for Options { (Long("fetch"), Some(Operation::TrackRepo { .. })) => fetch = true, (Long("no-fetch"), Some(Operation::TrackRepo { .. })) => fetch = false, (Long("verbose") | Short('v'), _) => verbose = true, - (Long("help"), _) => { + (Long("help") | Short('h'), _) => { return Err(Error::Help.into()); } _ => { diff --git a/radicle-cli/src/commands/unassign.rs b/radicle-cli/src/commands/unassign.rs index d4c9ffad..2462101f 100644 --- a/radicle-cli/src/commands/unassign.rs +++ b/radicle-cli/src/commands/unassign.rs @@ -47,7 +47,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Long("from") => { diff --git a/radicle-cli/src/commands/untag.rs b/radicle-cli/src/commands/untag.rs index 907d9a99..55e4db87 100644 --- a/radicle-cli/src/commands/untag.rs +++ b/radicle-cli/src/commands/untag.rs @@ -44,7 +44,7 @@ impl Args for Options { while let Some(arg) = parser.next()? { match arg { - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } Value(ref val) if id.is_none() => { diff --git a/radicle-cli/src/commands/untrack.rs b/radicle-cli/src/commands/untrack.rs index 1bc296f5..e9ee4f5a 100644 --- a/radicle-cli/src/commands/untrack.rs +++ b/radicle-cli/src/commands/untrack.rs @@ -60,7 +60,7 @@ impl Args for Options { } } (Long("verbose") | Short('v'), _) => verbose = true, - (Long("help"), _) => { + (Long("help") | Short('h'), _) => { return Err(Error::Help.into()); } _ => { diff --git a/radicle-cli/src/commands/web.rs b/radicle-cli/src/commands/web.rs index cff00c69..4bd5b29b 100644 --- a/radicle-cli/src/commands/web.rs +++ b/radicle-cli/src/commands/web.rs @@ -62,7 +62,7 @@ impl Args for Options { frontend = Some(parser.value()?.to_string_lossy().to_string()) } Long("json") => json = true, - Long("help") => { + Long("help") | Short('h') => { return Err(Error::Help.into()); } _ => { diff --git a/radicle-httpd/src/main.rs b/radicle-httpd/src/main.rs index 2d4c0759..065a54bc 100644 --- a/radicle-httpd/src/main.rs +++ b/radicle-httpd/src/main.rs @@ -64,7 +64,7 @@ fn parse_options() -> Result { aliases.insert(alias, id); } - Long("help") => { + Long("help") | Short('h') => { println!("usage: radicle-httpd [--listen ] [--alias ].."); process::exit(0); } diff --git a/radicle-node/src/main.rs b/radicle-node/src/main.rs index 0e7679d0..515c81d1 100644 --- a/radicle-node/src/main.rs +++ b/radicle-node/src/main.rs @@ -98,7 +98,7 @@ impl Options { let addr = parser.value()?.parse()?; listen.push(addr); } - Long("help") => { + Long("help") | Short('h') => { println!("{HELP_MSG}"); process::exit(0); } diff --git a/radicle-tui/src/main.rs b/radicle-tui/src/main.rs index 6689cb7f..7980f5af 100644 --- a/radicle-tui/src/main.rs +++ b/radicle-tui/src/main.rs @@ -41,7 +41,7 @@ impl Options { println!("{NAME} {VERSION}+{GIT_HEAD}"); process::exit(0); } - Long("help") => { + Long("help") | Short('h') => { println!("{HELP}"); process::exit(0); }