mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug #956
- Prevent any verbose information to be printed with the 'ids', 'uuids' and helper subcommands. - Unit tests. - Precise this behavior in the man pages.
This commit is contained in:
parent
fe954a6acc
commit
0b1b677aa5
5 changed files with 92 additions and 3 deletions
|
@ -365,6 +365,8 @@ int Context::dispatch (std::string &out)
|
|||
{
|
||||
updateXtermTitle ();
|
||||
|
||||
updateVerbosity ();
|
||||
|
||||
Command* c = commands[command];
|
||||
|
||||
// GC is invoked prior to running any command that displays task IDs, if
|
||||
|
@ -688,6 +690,23 @@ void Context::updateXtermTitle ()
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// This function allows a clean output if the command is a helper subcommand or
|
||||
// a command aimed at being used by an external script.
|
||||
void Context::updateVerbosity ()
|
||||
{
|
||||
std::string command;
|
||||
a3.find_command (command);
|
||||
|
||||
if (command[0] == '_' ||
|
||||
command == "ids" ||
|
||||
command == "uuids")
|
||||
{
|
||||
verbosity.clear ();
|
||||
verbosity.push_back ("nothing");
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Context::header (const std::string& input)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue