mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-24 08:56:43 +02:00
- 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:
parent
4a87ab74f4
commit
4858931592
3 changed files with 27 additions and 21 deletions
|
@ -95,8 +95,11 @@
|
||||||
controlled by '#define HAVE_EXECUTE 1' in cmake.h. This allows a build
|
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
|
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.
|
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.
|
+ Added feature #813, new "eoq" and "soq" dates for the end and start of
|
||||||
(thanks to Dave French and Paulo Almeida for the patch)
|
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.
|
# Tracked Bugs, sorted by ID.
|
||||||
+ Fixed bug #403, which disambiguates certain commands involving numbers.
|
+ Fixed bug #403, which disambiguates certain commands involving numbers.
|
||||||
|
@ -190,6 +193,8 @@
|
||||||
+ Fixed bug #839, which caused problems when recurrence frequencies of '1m'
|
+ 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
|
were used. This is an obsolete form, and should now be '1mo' (thanks to
|
||||||
Gour D).
|
Gour D).
|
||||||
|
+ Fixed bug #846, which prevented the default.command configuration from
|
||||||
|
handling multiple arguments (thanks to Uli Martens).
|
||||||
|
|
||||||
# Untracked Bugs, biggest first.
|
# Untracked Bugs, biggest first.
|
||||||
+ Fixed bug that required the '%YAML' prologue in a YAML import.
|
+ Fixed bug that required the '%YAML' prologue in a YAML import.
|
||||||
|
|
|
@ -154,7 +154,12 @@ void A3::capture_first (const std::string& arg)
|
||||||
{
|
{
|
||||||
// Break the new argument into parts that comprise a series.
|
// Break the new argument into parts that comprise a series.
|
||||||
std::vector <Arg> 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
|
// Locate an appropriate place to insert the series. This would be
|
||||||
// immediately after the program and command arguments.
|
// immediately after the program and command arguments.
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 24;
|
use Test::More tests => 21;
|
||||||
|
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'default.rc')
|
if (open my $fh, '>', 'default.rc')
|
||||||
|
@ -77,24 +77,20 @@ like ($output, qr/\//, 'default due added');
|
||||||
$output = qx{../src/task rc:default.rc};
|
$output = qx{../src/task rc:default.rc};
|
||||||
like ($output, qr/1 PROJECT L .+ priority specified/, 'default command worked');
|
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.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink qw(pending.data completed.data undo.data backlog.data synch.key default.rc);
|
||||||
ok (!-r 'pending.data', 'Removed pending.data');
|
ok (! -r 'pending.data' &&
|
||||||
|
! -r 'completed.data' &&
|
||||||
unlink 'completed.data';
|
! -r 'undo.data' &&
|
||||||
ok (!-r 'completed.data', 'Removed completed.data');
|
! -r 'backlog.data' &&
|
||||||
|
! -r 'synch.key' &&
|
||||||
unlink 'undo.data';
|
! -r 'default.rc', 'Cleanup');
|
||||||
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');
|
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue