Skip to content

Commit

Permalink
Add usage to modify command
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
patdavid committed Jun 11, 2021
1 parent 35dc22c commit 6389023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/CmdModify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) <id> <date>\nMust specify start|end command to modify. See 'timew help modify'.");
}

if (words.at (0) == "start")
Expand All @@ -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 ) <id> <date>\nMust specify start|end command to modify. See 'timew help modify'.", words.at (0));
}

if (ids.empty ())
Expand Down

0 comments on commit 6389023

Please sign in to comment.