mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
CmdX: Added error message when expected ids are missing
This commit is contained in:
parent
1e8709e0dc
commit
bd7f3d5015
7 changed files with 19 additions and 1 deletions
|
@ -87,7 +87,7 @@ int CmdJoin (
|
|||
}
|
||||
}
|
||||
else
|
||||
std::cout << "Provide two interval IDs to join them.\n";
|
||||
throw std::string ("Two IDs must be specified. See 'timew help join'.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,9 @@ int CmdLengthen (
|
|||
delta = arg.attribute ("raw");
|
||||
}
|
||||
|
||||
if (! ids.size ())
|
||||
throw std::string ("IDs must be specified. See 'timew help lengthen'.");
|
||||
|
||||
// TODO Support :adjust
|
||||
|
||||
// Load the data.
|
||||
|
|
|
@ -55,6 +55,9 @@ int CmdMove (
|
|||
new_start = arg.attribute ("raw");
|
||||
}
|
||||
|
||||
if (! id)
|
||||
throw std::string ("ID must be specified. See 'timew help move'.");
|
||||
|
||||
// TODO Support :adjust
|
||||
|
||||
// Load the data.
|
||||
|
|
|
@ -50,6 +50,9 @@ int CmdShorten (
|
|||
delta = arg.attribute ("raw");
|
||||
}
|
||||
|
||||
if (! ids.size ())
|
||||
throw std::string ("IDs must be specified. See 'timew help shorten'.");
|
||||
|
||||
// TODO Support :adjust
|
||||
|
||||
// Load the data.
|
||||
|
|
|
@ -50,6 +50,9 @@ int CmdSplit (
|
|||
delta = arg.attribute ("raw");
|
||||
}
|
||||
|
||||
if (! ids.size ())
|
||||
throw std::string ("IDs must be specified. See 'timew help split'.");
|
||||
|
||||
// TODO Support :adjust
|
||||
|
||||
// Load the data.
|
||||
|
|
|
@ -48,6 +48,9 @@ int CmdTag (
|
|||
tags.push_back (arg.attribute ("raw"));
|
||||
}
|
||||
|
||||
if (! ids.size ())
|
||||
throw std::string ("IDs must be specified. See 'timew help tag'.");
|
||||
|
||||
// Load the data.
|
||||
// Note: There is no filter.
|
||||
Interval filter;
|
||||
|
|
|
@ -48,6 +48,9 @@ int CmdUntag (
|
|||
tags.push_back (arg.attribute ("raw"));
|
||||
}
|
||||
|
||||
if (! ids.size ())
|
||||
throw std::string ("IDs must be specified. See 'timew help untag'.");
|
||||
|
||||
// Load the data.
|
||||
// Note: There is no filter.
|
||||
Interval filter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue