From 2e0e5ee0ead1b6f702b15bf58c57b1f5dee6a025 Mon Sep 17 00:00:00 2001 From: Chad Austin Date: Mon, 22 Feb 2021 14:09:48 -0800 Subject: [PATCH] cli_rs: explicit annotation of subcommand help text Summary: Comments affecting runtime behavior disturbs me, so use explicit structopt annotations on help text. And move those annotations to the command implementations. Reviewed By: fanzeyi Differential Revision: D26412452 fbshipit-source-id: 066dfdd1c54254bae4bd2af65031487b7a1094da --- eden/fs/cli_rs/edenfs-commands/src/lib.rs | 5 ----- eden/fs/cli_rs/edenfs-commands/src/pid.rs | 1 + eden/fs/cli_rs/edenfs-commands/src/status.rs | 1 + eden/fs/cli_rs/edenfs-commands/src/uptime.rs | 1 + 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/eden/fs/cli_rs/edenfs-commands/src/lib.rs b/eden/fs/cli_rs/edenfs-commands/src/lib.rs index e2c99b885d..d2851190ab 100644 --- a/eden/fs/cli_rs/edenfs-commands/src/lib.rs +++ b/eden/fs/cli_rs/edenfs-commands/src/lib.rs @@ -59,14 +59,9 @@ pub struct Command { #[derive(StructOpt, Debug)] pub enum SubCommand { - /// Check the health of the Eden service #[structopt(alias = "health")] Status(crate::status::StatusCmd), - - /// Print the daemon's process ID if running Pid(crate::pid::PidCmd), - - /// Determine uptime of running edenfs daemon Uptime(crate::uptime::UptimeCmd), } diff --git a/eden/fs/cli_rs/edenfs-commands/src/pid.rs b/eden/fs/cli_rs/edenfs-commands/src/pid.rs index a264d4d113..f5b6cf9c2f 100644 --- a/eden/fs/cli_rs/edenfs-commands/src/pid.rs +++ b/eden/fs/cli_rs/edenfs-commands/src/pid.rs @@ -15,6 +15,7 @@ use edenfs_client::EdenFsInstance; use crate::ExitCode; #[derive(StructOpt, Debug)] +#[structopt(about = "Print the daemon's process ID if running")] pub struct PidCmd {} impl PidCmd { diff --git a/eden/fs/cli_rs/edenfs-commands/src/status.rs b/eden/fs/cli_rs/edenfs-commands/src/status.rs index 50c7231dcc..63a18abf7d 100644 --- a/eden/fs/cli_rs/edenfs-commands/src/status.rs +++ b/eden/fs/cli_rs/edenfs-commands/src/status.rs @@ -17,6 +17,7 @@ use edenfs_client::{DaemonHealthy, EdenFsInstance}; use crate::ExitCode; #[derive(StructOpt, Debug)] +#[structopt(about = "Check the health of the Eden service")] pub struct StatusCmd { /// Wait up to TIMEOUT seconds for the daemon to respond #[structopt(long, default_value = "3")] diff --git a/eden/fs/cli_rs/edenfs-commands/src/uptime.rs b/eden/fs/cli_rs/edenfs-commands/src/uptime.rs index 4e46e858a6..e3925f9031 100644 --- a/eden/fs/cli_rs/edenfs-commands/src/uptime.rs +++ b/eden/fs/cli_rs/edenfs-commands/src/uptime.rs @@ -17,6 +17,7 @@ use edenfs_client::{DaemonHealthy, EdenFsInstance}; use crate::ExitCode; #[derive(StructOpt, Debug)] +#[structopt(about = "Determine uptime of running edenfs daemon")] pub struct UptimeCmd {} struct HumanTime {