Skip to content

Commit 6389023

Browse files
committed
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 ) <id> <date> 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 <[email protected]>
1 parent 35dc22c commit 6389023

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commands/CmdModify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int CmdModify (
4646

4747
if (words.empty())
4848
{
49-
throw std::string ("Must specify start|end command to modify. See 'timew help modify'.");
49+
throw std::string ("Usage: timew modify ( start | end ) <id> <date>\nMust specify start|end command to modify. See 'timew help modify'.");
5050
}
5151

5252
if (words.at (0) == "start")
@@ -59,7 +59,7 @@ int CmdModify (
5959
}
6060
else
6161
{
62-
throw format ("Must specify start|end command to modify. See 'timew help modify'.", words.at (0));
62+
throw format ("Usage: timew modify ( start | end ) <id> <date>\nMust specify start|end command to modify. See 'timew help modify'.", words.at (0));
6363
}
6464

6565
if (ids.empty ())

0 commit comments

Comments
 (0)