From 6389023e56543bf9076d17f44103888d4db344af Mon Sep 17 00:00:00 2001 From: Pat David Date: Fri, 11 Jun 2021 10:00:55 -0500 Subject: [PATCH] Add usage to modify command This commit adds the usage line from the manpage to the modify command for quick reference when called without parameters: ``` $ timew modify Usage: timew modify ( start | end ) Must specify start|end command to modify. See 'timew help modify'. ``` This makes it faster than looking up the syntax in the manpage and helps build faster memory of syntax for users. Signed-off-by: Pat David --- src/commands/CmdModify.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdModify.cpp b/src/commands/CmdModify.cpp index 844e5bf25..d5ff2ebaa 100644 --- a/src/commands/CmdModify.cpp +++ b/src/commands/CmdModify.cpp @@ -46,7 +46,7 @@ int CmdModify ( if (words.empty()) { - throw std::string ("Must specify start|end command to modify. See 'timew help modify'."); + throw std::string ("Usage: timew modify ( start | end ) \nMust specify start|end command to modify. See 'timew help modify'."); } if (words.at (0) == "start") @@ -59,7 +59,7 @@ int CmdModify ( } else { - throw format ("Must specify start|end command to modify. See 'timew help modify'.", words.at (0)); + throw format ("Usage: timew modify ( start | end ) \nMust specify start|end command to modify. See 'timew help modify'.", words.at (0)); } if (ids.empty ())