mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Bug Fix - default command, default unit test
- Task runs the default command when no arguments are provided, but when an "rc:..." argument is provided, it does not run the default command. - Implemented unit tests to verify the functioning of default commands, default project and default priority.
This commit is contained in:
parent
2216eee678
commit
4a524a220e
2 changed files with 86 additions and 1 deletions
|
@ -774,7 +774,9 @@ std::string runTaskCommand (
|
|||
// If argc == 1 and the default.command configuration variable is set,
|
||||
// then use that, otherwise stick with argc/argv.
|
||||
std::string defaultCommand = conf.get ("default.command");
|
||||
if (args.size () == 0 && defaultCommand != "")
|
||||
if ((args.size () == 0 ||
|
||||
(args.size () == 1 && args[0].substr (0, 3) == "rc:")) &&
|
||||
defaultCommand != "")
|
||||
{
|
||||
// Stuff the command line.
|
||||
args.clear ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue