- Added feature #827, which allows augmentation of default.command with extra
  arguments, when default.command itself contains mulitple arguments (thanks to
  Aikido Guy).
- Fixed bug #846, which prevented the default.command configuration from
  handling multiple arguments (thanks to Uli Martens).
This commit is contained in:
Paul Beckingham 2011-09-25 11:37:57 -04:00
parent 4a87ab74f4
commit 4858931592
3 changed files with 27 additions and 21 deletions

View file

@ -95,8 +95,11 @@
controlled by '#define HAVE_EXECUTE 1' in cmake.h. This allows a build
that does not have the potential security hole, in the event that taskwarrior
is run at elevated privilege, or run in the context of a web server.
+ Added feature #813, new "eoq" and "soq" dates for the end and start of quarter.
(thanks to Dave French and Paulo Almeida for the patch)
+ Added feature #813, new "eoq" and "soq" dates for the end and start of
quarter. (thanks to Dave French and Paulo Almeida for the patch).
+ Added feature #827, which allows augmentation of default.command with extra
arguments, when default.command itself contains mulitple arguments (thanks to
Aikido Guy).
# Tracked Bugs, sorted by ID.
+ Fixed bug #403, which disambiguates certain commands involving numbers.
@ -190,6 +193,8 @@
+ Fixed bug #839, which caused problems when recurrence frequencies of '1m'
were used. This is an obsolete form, and should now be '1mo' (thanks to
Gour D).
+ Fixed bug #846, which prevented the default.command configuration from
handling multiple arguments (thanks to Uli Martens).
# Untracked Bugs, biggest first.
+ Fixed bug that required the '%YAML' prologue in a YAML import.

View file

@ -154,7 +154,12 @@ void A3::capture_first (const std::string& arg)
{
// Break the new argument into parts that comprise a series.
std::vector <Arg> series;
series.push_back (Arg (arg));
std::vector <std::string> separated;
splitq (separated, arg, ' ');
std::vector <std::string>::iterator sep;
for (sep = separated.begin (); sep != separated.end (); ++sep)
series.push_back (Arg (*sep));
// Locate an appropriate place to insert the series. This would be
// immediately after the program and command arguments.

View file

@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 24;
use Test::More tests => 21;
# Create the rc file.
if (open my $fh, '>', 'default.rc')
@ -77,24 +77,20 @@ like ($output, qr/\//, 'default due added');
$output = qx{../src/task rc:default.rc};
like ($output, qr/1 PROJECT L .+ priority specified/, 'default command worked');
qx{../src/task rc:default.rc add project:HOME priority:M due:tomorrow all specified};
qx{echo '-- y' | ../src/task rc:default.rc config default.command 'list priority:M'};
$output = qx{../src/task rc:default.rc};
like ($output, qr/ M /, 'priority:M included in default command');
unlike ($output, qr/ L /, 'priority:L excluded from default command');
# Cleanup.
unlink 'pending.data';
ok (!-r 'pending.data', 'Removed pending.data');
unlink 'completed.data';
ok (!-r 'completed.data', 'Removed completed.data');
unlink 'undo.data';
ok (!-r 'undo.data', 'Removed undo.data');
unlink 'backlog.data';
ok (!-r 'backlog.data', 'Removed backlog.data');
unlink 'synch.key';
ok (!-r 'synch.key', 'Removed synch.key');
unlink 'default.rc';
ok (!-r 'default.rc', 'Removed default.rc');
unlink qw(pending.data completed.data undo.data backlog.data synch.key default.rc);
ok (! -r 'pending.data' &&
! -r 'completed.data' &&
! -r 'undo.data' &&
! -r 'backlog.data' &&
! -r 'synch.key' &&
! -r 'default.rc', 'Cleanup');
exit 0;