Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12c4983936 | ||
|
|
39d9f235de | ||
|
|
7aa0c3698a | ||
|
|
bc40ab63b3 | ||
|
|
6e673d2834 | ||
|
|
30c6dd0047 | ||
|
|
64bc2a165a | ||
|
|
5b96dbbce8 | ||
|
|
77dd930574 | ||
|
|
f6842941f3 | ||
|
|
e2e0851a69 | ||
|
|
1299fe468b | ||
|
|
de50b2902c | ||
|
|
09d7940dd3 | ||
|
|
00031dc1ab |
2
AUTHORS
2
AUTHORS
@@ -18,6 +18,7 @@ The following submitted code, packages or analysis, and deserve special thanks:
|
|||||||
Johan Friis
|
Johan Friis
|
||||||
Steven de Brouwer
|
Steven de Brouwer
|
||||||
Pietro Cerutti
|
Pietro Cerutti
|
||||||
|
Cory Donnelly
|
||||||
|
|
||||||
Thanks to the following, who submitted detailed bug reports and excellent suggestions:
|
Thanks to the following, who submitted detailed bug reports and excellent suggestions:
|
||||||
Eugene Kramer
|
Eugene Kramer
|
||||||
@@ -39,3 +40,4 @@ Thanks to the following, who submitted detailed bug reports and excellent sugges
|
|||||||
Thomas@BIC
|
Thomas@BIC
|
||||||
Ian Mortimer
|
Ian Mortimer
|
||||||
Zach Frazier
|
Zach Frazier
|
||||||
|
Joe Pulliam
|
||||||
|
|||||||
15
ChangeLog
15
ChangeLog
@@ -1,11 +1,22 @@
|
|||||||
|
|
||||||
------ current release ---------------------------
|
------ current release ---------------------------
|
||||||
|
|
||||||
1.8.3 (10/21/2009)
|
1.8.4 (11/17/2009)
|
||||||
+ Added support for Haiku R1/alpha1
|
+ Fixed bug that caused wait: dates to not be properly rendered in a
|
||||||
|
readable and preferred format with the "edit" command.
|
||||||
|
+ Fixed bug that caused a hang on cygwin, when a task with multiple
|
||||||
|
annotations was edited (thanks to Joe Pulliam).
|
||||||
|
+ Fixed bug #314 where the edit command fails when data.location includes
|
||||||
|
directories containing spaces (thanks to Cory Donnelly).
|
||||||
|
+ Added a warning (issue #312) when modifying recurring tasks, that all
|
||||||
|
instances of that task may be modified. When task confirms a bulk edit
|
||||||
|
the recurrence is again indicated (thanks to Cory Donnelly).
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
1.8.3 (10/21/2009) bcdcbeeea0d92f21c3565aebfaf6332b959f4025
|
||||||
|
+ Added support for Haiku R1/alpha1
|
||||||
|
|
||||||
1.8.2 (9/7/2009) f243f0ed443ecd7dde779de8a6525222591024db
|
1.8.2 (9/7/2009) f243f0ed443ecd7dde779de8a6525222591024db
|
||||||
+ Added feature #282 that returns useful exit codes to the shell. Now a
|
+ Added feature #282 that returns useful exit codes to the shell. Now a
|
||||||
script can detect whether no tasks were returned by a report (thanks to
|
script can detect whether no tasks were returned by a report (thanks to
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.61)
|
AC_PREREQ(2.61)
|
||||||
AC_INIT(task, 1.8.3, support@taskwarrior.org)
|
AC_INIT(task, 1.8.4, support@taskwarrior.org)
|
||||||
|
|
||||||
CFLAGS="${CFLAGS=}"
|
CFLAGS="${CFLAGS=}"
|
||||||
CXXFLAGS="${CXXFLAGS=}"
|
CXXFLAGS="${CXXFLAGS=}"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH task-tutorial 5 2009-10-21 "task 1.8.3" "User Manuals"
|
.TH task-tutorial 5 2009-10-21 "task 1.8.4" "User Manuals"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
task-tutorial \- A tutorial for the task(1) command line todo manager.
|
task-tutorial \- A tutorial for the task(1) command line todo manager.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH task 1 2009-10-21 "task 1.8.3" "User Manuals"
|
.TH task 1 2009-10-21 "task 1.8.4" "User Manuals"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
task \- A command line todo manager.
|
task \- A command line todo manager.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.TH taskrc 5 2009-10-21 "task 1.8.3" "User Manuals"
|
.TH taskrc 5 2009-10-21 "task 1.8.4" "User Manuals"
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
taskrc \- Configuration file for the task(1) command
|
taskrc \- Configuration file for the task(1) command
|
||||||
|
|||||||
@@ -57,8 +57,15 @@ bool Permission::confirmed (const Task& task, const std::string& question)
|
|||||||
<< task.id
|
<< task.id
|
||||||
<< " \""
|
<< " \""
|
||||||
<< task.get ("description")
|
<< task.get ("description")
|
||||||
<< "\""
|
<< "\"";
|
||||||
<< std::endl;
|
|
||||||
|
if (task.getStatus () == Task::recurring ||
|
||||||
|
task.has ("parent"))
|
||||||
|
{
|
||||||
|
std::cout << " (Recurring)";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << std::endl;
|
||||||
|
|
||||||
int answer = confirm3 (question);
|
int answer = confirm3 (question);
|
||||||
if (answer == 2)
|
if (answer == 2)
|
||||||
|
|||||||
12
src/Task.cpp
12
src/Task.cpp
@@ -134,7 +134,7 @@ void Task::setEntry ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Task::status Task::getStatus ()
|
Task::status Task::getStatus () const
|
||||||
{
|
{
|
||||||
return textToStatus (get ("status")); // No i18n
|
return textToStatus (get ("status")); // No i18n
|
||||||
}
|
}
|
||||||
@@ -441,10 +441,14 @@ void Task::addAnnotation (const std::string& description)
|
|||||||
void Task::removeAnnotations ()
|
void Task::removeAnnotations ()
|
||||||
{
|
{
|
||||||
// Erase old annotations.
|
// Erase old annotations.
|
||||||
Record::iterator i;
|
Record::iterator i = this->begin ();
|
||||||
for (i = this->begin (); i != this->end (); ++i)
|
while (i != this->end ())
|
||||||
|
{
|
||||||
if (i->first.substr (0, 11) == "annotation_") // No i18n
|
if (i->first.substr (0, 11) == "annotation_") // No i18n
|
||||||
this->erase (i);
|
this->erase (i++);
|
||||||
|
else
|
||||||
|
i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
void setEntry ();
|
void setEntry ();
|
||||||
|
|
||||||
status getStatus ();
|
status getStatus () const;
|
||||||
void setStatus (status);
|
void setStatus (status);
|
||||||
|
|
||||||
int getTagCount ();
|
int getTagCount ();
|
||||||
|
|||||||
@@ -958,6 +958,13 @@ int handleModify (std::string &outs)
|
|||||||
task->get ("parent") == other->get ("parent")) || // Sibling
|
task->get ("parent") == other->get ("parent")) || // Sibling
|
||||||
other->get ("uuid") == task->get ("parent")) // Parent
|
other->get ("uuid") == task->get ("parent")) // Parent
|
||||||
{
|
{
|
||||||
|
if (task->has ("parent"))
|
||||||
|
std::cout << "Task "
|
||||||
|
<< task->id
|
||||||
|
<< " is a recurring task, and all other instances of this"
|
||||||
|
<< " task may be modified."
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
Task before (*other);
|
Task before (*other);
|
||||||
|
|
||||||
// A non-zero value forces a file write.
|
// A non-zero value forces a file write.
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static std::string formatTask (Task task)
|
|||||||
<< " Due: " << formatDate (task, "due") << std::endl
|
<< " Due: " << formatDate (task, "due") << std::endl
|
||||||
<< " Until: " << formatDate (task, "until") << std::endl
|
<< " Until: " << formatDate (task, "until") << std::endl
|
||||||
<< " Recur: " << task.get ("recur") << std::endl
|
<< " Recur: " << task.get ("recur") << std::endl
|
||||||
<< " Wait until: " << task.get ("wait") << std::endl
|
<< " Wait until: " << formatDate (task, "wait") << std::endl
|
||||||
<< " Parent: " << task.get ("parent") << std::endl
|
<< " Parent: " << task.get ("parent") << std::endl
|
||||||
<< " Foreground color: " << task.get ("fg") << std::endl
|
<< " Foreground color: " << task.get ("fg") << std::endl
|
||||||
<< " Background color: " << task.get ("bg") << std::endl
|
<< " Background color: " << task.get ("bg") << std::endl
|
||||||
@@ -543,7 +543,7 @@ void editFile (Task& task)
|
|||||||
|
|
||||||
// Complete the command line.
|
// Complete the command line.
|
||||||
editor += " ";
|
editor += " ";
|
||||||
editor += file.str ();
|
editor += "\"" + file.str () + "\"";
|
||||||
|
|
||||||
ARE_THESE_REALLY_HARMFUL:
|
ARE_THESE_REALLY_HARMFUL:
|
||||||
// Launch the editor.
|
// Launch the editor.
|
||||||
|
|||||||
83
src/task.h
83
src/task.h
@@ -1,83 +0,0 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// task - a command line task list manager.
|
|
||||||
//
|
|
||||||
// Copyright 2006 - 2009, Paul Beckingham.
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify it under
|
|
||||||
// the terms of the GNU General Public License as published by the Free Software
|
|
||||||
// Foundation; either version 2 of the License, or (at your option) any later
|
|
||||||
// version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
// details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License along with
|
|
||||||
// this program; if not, write to the
|
|
||||||
//
|
|
||||||
// Free Software Foundation, Inc.,
|
|
||||||
// 51 Franklin Street, Fifth Floor,
|
|
||||||
// Boston, MA
|
|
||||||
// 02110-1301
|
|
||||||
// USA
|
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
#ifndef INCLUDED_TASK
|
|
||||||
#define INCLUDED_TASK
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include "Record.h"
|
|
||||||
#include "Subst.h"
|
|
||||||
#include "Sequence.h"
|
|
||||||
|
|
||||||
class Task : public Record
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Task (); // Default constructor
|
|
||||||
Task (const Task&); // Copy constructor
|
|
||||||
Task& operator= (const Task&); // Assignment operator
|
|
||||||
bool operator== (const Task&); // Comparison operator
|
|
||||||
Task (const std::string&); // Parse
|
|
||||||
~Task (); // Destructor
|
|
||||||
|
|
||||||
void parse (const std::string&);
|
|
||||||
std::string composeCSV () const;
|
|
||||||
|
|
||||||
// Status values.
|
|
||||||
enum status {pending, completed, deleted, recurring, waiting};
|
|
||||||
|
|
||||||
// Public data.
|
|
||||||
int id;
|
|
||||||
|
|
||||||
// Series of helper functions.
|
|
||||||
static status textToStatus (const std::string&);
|
|
||||||
static std::string statusToText (status);
|
|
||||||
|
|
||||||
void setEntry ();
|
|
||||||
|
|
||||||
status getStatus ();
|
|
||||||
void setStatus (status);
|
|
||||||
|
|
||||||
int getTagCount ();
|
|
||||||
bool hasTag (const std::string&);
|
|
||||||
void addTag (const std::string&);
|
|
||||||
void addTags (const std::vector <std::string>&);
|
|
||||||
void getTags (std::vector<std::string>&) const;
|
|
||||||
void removeTag (const std::string&);
|
|
||||||
|
|
||||||
void getAnnotations (std::vector <Att>&) const;
|
|
||||||
void setAnnotations (const std::vector <Att>&);
|
|
||||||
void addAnnotation (const std::string&);
|
|
||||||
void removeAnnotations ();
|
|
||||||
|
|
||||||
void validate () const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
int determineVersion (const std::string&);
|
|
||||||
void legacyParse (const std::string&);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
@@ -58,7 +58,7 @@ if ( $day <= 9)
|
|||||||
# task cal and task cal y
|
# task cal and task cal y
|
||||||
my $output = qx{../task rc:cal.rc rc._forcecolor:on cal};
|
my $output = qx{../task rc:cal.rc rc._forcecolor:on cal};
|
||||||
like ($output, qr/\[36m$day/, 'Current day is highlighted');
|
like ($output, qr/\[36m$day/, 'Current day is highlighted');
|
||||||
like ($output, qr/$month.* $year/, 'Current month and year are displayed');
|
like ($output, qr/$month\w+?\s+?$year/, 'Current month and year are displayed');
|
||||||
qx{../task rc:cal.rc add zero};
|
qx{../task rc:cal.rc add zero};
|
||||||
unlike ($output, qr/\[41m\d+/, 'No overdue tasks are present');
|
unlike ($output, qr/\[41m\d+/, 'No overdue tasks are present');
|
||||||
unlike ($output, qr/\[43m\d+/, 'No due tasks are present');
|
unlike ($output, qr/\[43m\d+/, 'No due tasks are present');
|
||||||
@@ -67,9 +67,9 @@ like ($output, qr/Su Mo Tu/, 'Week starts on Sunday');
|
|||||||
$output = qx{../task rc:cal.rc rc.weekstart:Monday cal};
|
$output = qx{../task rc:cal.rc rc.weekstart:Monday cal};
|
||||||
like ($output, qr/Fr Sa Su/, 'Week starts on Monday');
|
like ($output, qr/Fr Sa Su/, 'Week starts on Monday');
|
||||||
$output = qx{../task rc:cal.rc cal y};
|
$output = qx{../task rc:cal.rc cal y};
|
||||||
like ($output, qr/$month.* $year/, 'Current month and year are displayed');
|
like ($output, qr/$month\w+?\s+?$year/, 'Current month and year are displayed');
|
||||||
like ($output, qr/$prevmonth.* $nextyear/, 'Month and year one year ahead are displayed');
|
like ($output, qr/$prevmonth\w+?\s+?$nextyear/, 'Month and year one year ahead are displayed');
|
||||||
unlike ($output, qr/$month.* $nextyear/, 'Current month and year ahead are not displayed');
|
unlike ($output, qr/$month\w+?\s+?$nextyear/, 'Current month and year ahead are not displayed');
|
||||||
|
|
||||||
# task cal due and task cal due y
|
# task cal due and task cal due y
|
||||||
qx{../task rc:cal.rc add due:20190515 one};
|
qx{../task rc:cal.rc add due:20190515 one};
|
||||||
|
|||||||
Reference in New Issue
Block a user