- 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:
Louis-Claude Canon 2012-05-22 18:01:30 +02:00 committed by Paul Beckingham
parent fe954a6acc
commit 0b1b677aa5
5 changed files with 92 additions and 3 deletions

View file

@ -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)
{