rust/rhg/src/commands/cat.rs
changeset 46501 1ecaf09d9964
parent 46500 184e46550dc8
child 46503 d8730ff51d5a
--- a/rust/rhg/src/commands/cat.rs	Mon Feb 08 20:33:04 2021 +0100
+++ b/rust/rhg/src/commands/cat.rs	Mon Feb 08 21:05:36 2021 +0100
@@ -1,5 +1,6 @@
 use crate::error::CommandError;
 use crate::ui::Ui;
+use clap::Arg;
 use clap::ArgMatches;
 use hg::config::Config;
 use hg::operations::cat;
@@ -12,6 +13,27 @@
 Output the current or given revision of files
 ";
 
+pub fn args() -> clap::App<'static, 'static> {
+    clap::SubCommand::with_name("cat")
+        .arg(
+            Arg::with_name("rev")
+                .help("search the repository as it is in REV")
+                .short("-r")
+                .long("--revision")
+                .value_name("REV")
+                .takes_value(true),
+        )
+        .arg(
+            clap::Arg::with_name("files")
+                .required(true)
+                .multiple(true)
+                .empty_values(false)
+                .value_name("FILE")
+                .help("Activity to start: activity@category"),
+        )
+        .about(HELP_TEXT)
+}
+
 #[timed]
 pub fn run(
     ui: &Ui,