diff --git a/AUTHORS b/AUTHORS index 797eb7171..6f0225037 100644 --- a/AUTHORS +++ b/AUTHORS @@ -155,4 +155,5 @@ suggestions: Marek Vitek Rene Vergara Stéphane Pezennec + Jim B diff --git a/ChangeLog b/ChangeLog index dc6e244a7..9d05c1173 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,19 +1,12 @@ ------ current release --------------------------- -2.1.2 (2012-09-18) 1e3176ed70d2b50faf03838d0df279b2a4ae93b2 - -Bugs - + Fix bug #1056, where CmdSummary did not print abstract parents. - + Bug fix release regarding #1104, which causes duplicate UUIDs during - the merge command. - + Fixed bug where shadow files are not properly created when there is a missing - .taskrc file (thanks to Pietro Cerutti). +2.2.0 () - Features - + The 'projects' command now outputs abstract parents and reduces - repetition by not printing parent names in front of children names. + Added Feature #1069, which gives a clearer error when a UDA is added without the uda..type variable. + + The 'projects' command now outputs abstract parents and reduces + repetition by not printing parent names in front of children names. + Added framework for testing bash autocompletion. + New helper command '_aliases' for autocompletion purposes. + Stop consider new tasks after quitting a bulk change. @@ -23,26 +16,39 @@ Features + Virtual tags. Bugs - + No more bash completion of, for example, 'projABC:', or of 'proj:' if - abbreviation.minimum is greater than 4. - + Fixed bug #1059, where CmdEdit was running garbage collection. - + Fixed bug #1065, where CmdShow issued messages in incorrect situations. - + Fixed bug #1060, where an error was not thrown correctly. - + Fixed bug #1043, where aliases were not recognized by bash autocompletion. + + Fixed bug #1031, which kept expanding aliases after the '--' operator (thanks + to Jim B). + Fixed bug #1038, which prints blank lines with bulk changes and when the verbose attributes does not specify it. Lines do a better separation between each changes also. + Fixed bug #1042, where the 'diagnostics' command failed to detect missing external utilities on Solaris and NetBSD. + + Fixed bug #1043, where aliases were not recognized by bash autocompletion. + Fixed bug #1044, where 'task projects' considers newly deleted tasks and provides an incorrect summary. + Fixed bug #1048, which segfaulted rather than complain about syntax (thanks to Bryce Harrington, Štěpán Henek). + + Fixed bug #1056, where CmdSummary did not print abstract parents. + + Fixed bug #1059, where CmdEdit was running garbage collection. + + Fixed bug #1060, where an error was not thrown correctly. + + Fixed bug #1065, where CmdShow issued messages in incorrect situations. + Partially fixed #1083, which showed 'task 0 ...' when modifying a non- pending task (thanks to Aikido Guy). + + No more bash completion of, for example, 'projABC:', or of 'proj:' if + abbreviation.minimum is greater than 4. + + Fixed bug where shadow files are not properly created when there is a missing + .taskrc file (thanks to Pietro Cerutti). ------ old releases ------------------------------ +2.1.2 (2012-09-18) 1e3176ed70d2b50faf03838d0df279b2a4ae93b2 + +Bugs + + Bug fix release regarding #1104, which causes duplicate UUIDs during + the merge command. + + Fixed bug where shadow files are not properly created when there is a missing + .taskrc file (thanks to Pietro Cerutti). + 2.1.1 (2012-07-24) 46c5f8b826838ce96d9df7fcd3039de3c43483dd Bugs diff --git a/src/A3.cpp b/src/A3.cpp index 49fdec91b..4a7175df0 100644 --- a/src/A3.cpp +++ b/src/A3.cpp @@ -384,6 +384,10 @@ void A3::resolve_aliases () std::vector ::iterator arg; for (arg = this->begin (); arg != this->end (); ++arg) { + // The -- operator stops alias expansion. + if (arg->_raw == "--") + break; + std::map ::iterator match = context.aliases.find (arg->_raw); @@ -408,6 +412,10 @@ void A3::resolve_aliases () expanded.push_back (arg->_raw); } + // Copy any residual tokens. + for (; arg != this->end (); ++arg) + expanded.push_back (arg->_raw); + // Only overwrite if something happened. if (something) { diff --git a/test/bug.1031.t b/test/bug.1031.t new file mode 100755 index 000000000..ec4fa1779 --- /dev/null +++ b/test/bug.1031.t @@ -0,0 +1,66 @@ +#! /usr/bin/env perl +################################################################################ +## taskwarrior - a command line task list manager. +## +## Copyright 2006-2012, Paul Beckingham, Federico Hernandez. +## +## Permission is hereby granted, free of charge, to any person obtaining a copy +## of this software and associated documentation files (the "Software"), to deal +## in the Software without restriction, including without limitation the rights +## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +## copies of the Software, and to permit persons to whom the Software is +## furnished to do so, subject to the following conditions: +## +## The above copyright notice and this permission notice shall be included +## in all copies or substantial portions of the Software. +## +## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +## OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +## THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +## SOFTWARE. +## +## http://www.opensource.org/licenses/mit-license.php +## +################################################################################ + +use strict; +use warnings; +use Test::More tests => 5; + +# Create the rc file. +if (open my $fh, '>', 'bug.rc') +{ + print $fh "data.location=.\n", + "alias.from=to\n"; + close $fh; + ok (-r 'bug.rc', 'Created bug.rc'); +} + +# Bug 1031: -- does not bypass aliasing +qx{../src/task rc:bug.rc add from 2>&1}; +qx{../src/task rc:bug.rc add from -- to 2>&1}; +qx{../src/task rc:bug.rc add to -- from 2>&1}; + +my $output = qx{../src/task rc:bug.rc 1 info 2>&1}; +like ($output, qr/Description\s+to$/ms, "'from' --> 'to'"); + +$output = qx{../src/task rc:bug.rc 2 info 2>&1}; +like ($output, qr/Description\s+to to$/ms, "'from -- to' --> 'to to'"); + +$output = qx{../src/task rc:bug.rc 3 info 2>&1}; +like ($output, qr/Description\s+to from$/ms, "'to -- from' --> 'to from'"); + +# Cleanup. +unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); +ok (! -r 'pending.data' && + ! -r 'completed.data' && + ! -r 'undo.data' && + ! -r 'backlog.data' && + ! -r 'synch.key' && + ! -r 'bug.rc', 'Cleanup'); + +exit 0; +