mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-01 11:20:19 +02:00
Bug Fix - #369 task config color.alternate does not take multiple args
- Fixed bug that meant these commands would not work: $ task config name 'one two three' $ task config name one two three (thanks to Richard Querin).
This commit is contained in:
parent
0642c37c04
commit
73d6e05c0e
3 changed files with 21 additions and 2 deletions
|
@ -75,6 +75,8 @@
|
||||||
Florian).
|
Florian).
|
||||||
+ Fixed bug #368 which caused recurring tasks 'until' dates to be rendered as
|
+ Fixed bug #368 which caused recurring tasks 'until' dates to be rendered as
|
||||||
epoch numbers instead of dates (thanks to Cory Donnelly).
|
epoch numbers instead of dates (thanks to Cory Donnelly).
|
||||||
|
+ Fixed bug #369 which prevented the config command from setting quoted or
|
||||||
|
unquoted multi-word values (thanks to Richard Querin).
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -560,7 +560,15 @@ int handleConfig (std::string &outs)
|
||||||
std::string value = "";
|
std::string value = "";
|
||||||
|
|
||||||
if (args.size () > 1)
|
if (args.size () > 1)
|
||||||
value = args[1];
|
{
|
||||||
|
for (unsigned int i = 1; i < args.size (); ++i)
|
||||||
|
{
|
||||||
|
if (i > 1)
|
||||||
|
value += " ";
|
||||||
|
|
||||||
|
value += args[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (name != "")
|
if (name != "")
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use File::Path;
|
use File::Path;
|
||||||
use Test::More tests => 13;
|
use Test::More tests => 15;
|
||||||
|
|
||||||
# Create the rc file, using rc.name:value.
|
# Create the rc file, using rc.name:value.
|
||||||
unlink 'foo.rc';
|
unlink 'foo.rc';
|
||||||
|
@ -74,6 +74,15 @@ qx{echo 'y'|../task rc:foo.rc config -- report.:b +c};
|
||||||
$output = qx{../task rc:foo.rc config};
|
$output = qx{../task rc:foo.rc config};
|
||||||
like ($output, qr/^report\.:b\s+\+c/ms, 'the -- operator is working');
|
like ($output, qr/^report\.:b\s+\+c/ms, 'the -- operator is working');
|
||||||
|
|
||||||
|
# Make sure the value is accepted if it has multiple words.
|
||||||
|
qx{echo 'y'|../task rc:foo.rc config must_be_unique 'one two three'};
|
||||||
|
$output = qx{../task rc:foo.rc config};
|
||||||
|
like ($output, qr/^must_be_unique\s+one two three$/ms, 'config allows multi-word quoted values');
|
||||||
|
|
||||||
|
qx{echo 'y'|../task rc:foo.rc config must_be_unique one two three};
|
||||||
|
$output = qx{../task rc:foo.rc config};
|
||||||
|
like ($output, qr/^must_be_unique\s+one two three$/ms, 'config allows multi-word unquoted values');
|
||||||
|
|
||||||
rmtree 'foo', 0, 0;
|
rmtree 'foo', 0, 0;
|
||||||
ok (!-r 'foo', 'Removed foo');
|
ok (!-r 'foo', 'Removed foo');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue