mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
Configuration
- Allows rc.tag.indicator to replace the default + indicator. - Allows rc.active.indicator to replace the default * indicator. - Allows rc.recurrence.indicator to replace the default R indicator.
This commit is contained in:
parent
22d99806d0
commit
67546f8163
7 changed files with 52 additions and 17 deletions
33
ChangeLog
33
ChangeLog
|
@ -33,9 +33,9 @@
|
||||||
+ The 'entry', 'start' and 'end' columns now have equivalents that include the
|
+ The 'entry', 'start' and 'end' columns now have equivalents that include the
|
||||||
time, and are called 'entry_time', 'start_time', and 'end_time', for use in
|
time, and are called 'entry_time', 'start_time', and 'end_time', for use in
|
||||||
custom reports.
|
custom reports.
|
||||||
+ 2 new columns have been added to the reports: countdown and countdown_compact.
|
+ 2 new columns have been added to the reports: countdown and
|
||||||
They show the days left until a task is due or how many days a task has been
|
countdown_compact. They show the days left until a task is due or how many
|
||||||
overdue.
|
days a task has been overdue.
|
||||||
+ The new 'priority_long' field can be shown in custom reports, and will
|
+ The new 'priority_long' field can be shown in custom reports, and will
|
||||||
display 'High' rather than the abbreviated 'H'.
|
display 'High' rather than the abbreviated 'H'.
|
||||||
+ Task now supports .taskrc command line overrides using rc.name:value and
|
+ Task now supports .taskrc command line overrides using rc.name:value and
|
||||||
|
@ -47,22 +47,32 @@
|
||||||
+ Added 2 new configuration variables to display the details of tasks with due
|
+ Added 2 new configuration variables to display the details of tasks with due
|
||||||
dates when doing a 'task cal' for the corresponding months:
|
dates when doing a 'task cal' for the corresponding months:
|
||||||
'calendar.details' and 'calendar.details.report'
|
'calendar.details' and 'calendar.details.report'
|
||||||
+ Added 5 new color configuration variables to colorize today, days with due tasks,
|
+ Added 5 new color configuration variables to colorize today, days with due
|
||||||
days with overdue tasks, weekend days and week numbers in the calendar:
|
tasks, days with overdue tasks, weekend days and week numbers in the
|
||||||
|
calendar:
|
||||||
'calendar.color.today', 'color.calendar.due', 'calendar.calendar.overdue',
|
'calendar.color.today', 'color.calendar.due', 'calendar.calendar.overdue',
|
||||||
'color.calendar.weekend'and 'color.calendar.weeknumber'.
|
'color.calendar.weekend'and 'color.calendar.weeknumber'.
|
||||||
+ Added support for holidays in the calendar by using calendar.holidays
|
+ Added support for holidays in the calendar by using calendar.holidays
|
||||||
and the corresponding holiday.X.name and holiday.X.date variables.
|
and the corresponding holiday.X.name and holiday.X.date variables.
|
||||||
The default dateformat being YMD (20101224) set by dateformat.holiday.
|
The default dateformat being YMD (20101224) set by dateformat.holiday.
|
||||||
+ The coloring of due tasks in reports can now be enabled for all tasks, and not
|
+ The coloring of due tasks in reports can now be enabled for all tasks, and
|
||||||
only the imminent ones, by setting the configuration variable due=0.
|
not only the imminent ones, by setting the configuration variable due=0.
|
||||||
+ Tasks due on the current day ("today") can now have their own color setting
|
+ Tasks due on the current day ("today") can now have their own color setting
|
||||||
color.due.today and color.calendar.due.today.
|
color.due.today and color.calendar.due.today.
|
||||||
+ Added a new 'task-faq' man page for common questions and answers.
|
+ Added a new 'task-faq' man page for common questions and answers.
|
||||||
+ Added a new 'task-color' man page detailing how to set up and use color in
|
+ Added a new 'task-color' man page detailing how to set up and use color in
|
||||||
task.
|
task.
|
||||||
+ Added feature #176, which allows for configurable case-sensitivity for keyword
|
+ Added feature #176, which allows for configurable case-sensitivity for
|
||||||
|
keyword
|
||||||
searches and substitutions (thanks to John Florian).
|
searches and substitutions (thanks to John Florian).
|
||||||
|
+ Task can now use an alternate tag indicator by setting the tag.indicator
|
||||||
|
configuration variable to something other than the default of +.
|
||||||
|
+ Task can now use an alternate active indicator by setting the
|
||||||
|
active.indicator configuration variable to something other than the default
|
||||||
|
of *.
|
||||||
|
+ Task can now use an alternate recurrence indicator by setting the
|
||||||
|
recurrence.indicator configuration variable to something other than the
|
||||||
|
default of R.
|
||||||
+ Fixed bug #316 which caused the timesheet report to display an oddly sorted
|
+ Fixed bug #316 which caused the timesheet report to display an oddly sorted
|
||||||
list.
|
list.
|
||||||
+ Fixed bug #317 which colored tasks in the 'completed' report according to
|
+ Fixed bug #317 which colored tasks in the 'completed' report according to
|
||||||
|
@ -180,8 +190,8 @@
|
||||||
+ Fixed bug that allowed a recurring task to be added without a due date.
|
+ Fixed bug that allowed a recurring task to be added without a due date.
|
||||||
+ Fixed bug that displays the wrong .taskrc file name on override (thanks to
|
+ Fixed bug that displays the wrong .taskrc file name on override (thanks to
|
||||||
Federico Hernandez).
|
Federico Hernandez).
|
||||||
+ Fixed bug that failed to suppress color control code in the header and footnote
|
+ Fixed bug that failed to suppress color control code in the header and
|
||||||
when redirecting output to a file (thanks to John Florian).
|
footnote when redirecting output to a file (thanks to John Florian).
|
||||||
|
|
||||||
1.8.0 (7/21/2009) 14977ef317bd004dae2f2c313e806af9f2a2140c
|
1.8.0 (7/21/2009) 14977ef317bd004dae2f2c313e806af9f2a2140c
|
||||||
+ Added zsh tab completion script (thanks to P.C. Shyamshankar).
|
+ Added zsh tab completion script (thanks to P.C. Shyamshankar).
|
||||||
|
@ -498,7 +508,8 @@
|
||||||
+ Bug: configure.ac does not properly determine ncurses availability.
|
+ Bug: configure.ac does not properly determine ncurses availability.
|
||||||
+ Bug: Cannot seem to use the percent character in a task description.
|
+ Bug: Cannot seem to use the percent character in a task description.
|
||||||
+ Bug: New installation "task stats" reports newest task 12/31/1969.
|
+ Bug: New installation "task stats" reports newest task 12/31/1969.
|
||||||
+ Bug: New installation task projects displays header but no data - should short-circuit.
|
+ Bug: New installation task projects displays header but no data - should
|
||||||
|
short-circuit.
|
||||||
+ Bug: incorrect color specification in sample .taskrc file.
|
+ Bug: incorrect color specification in sample .taskrc file.
|
||||||
+ Bug: when run without arguments, task dumps core on Solaris 10.
|
+ Bug: when run without arguments, task dumps core on Solaris 10.
|
||||||
+ "task calendar" now reports all months with due pending tasks.
|
+ "task calendar" now reports all months with due pending tasks.
|
||||||
|
|
|
@ -238,6 +238,18 @@ Turning this value off causes task to generate a more vertically compact output.
|
||||||
The task shell command uses this value as a prompt. You can change it to any
|
The task shell command uses this value as a prompt. You can change it to any
|
||||||
string you like.
|
string you like.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B active.indicator=*
|
||||||
|
The character or string to show in the active column. Defaults to *.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B tag.indicator=+
|
||||||
|
The character or string to show in the tag_indicator column. Defaults to +.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B recurrence.indicator=R
|
||||||
|
The character or string to show in the recurrence_indicator column. Defaults to R.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B debug=off
|
.B debug=off
|
||||||
Task has a debug mode that causes diagnostic output to be displayed. Typically
|
Task has a debug mode that causes diagnostic output to be displayed. Typically
|
||||||
|
|
|
@ -65,6 +65,9 @@ std::string Config::defaults =
|
||||||
"bulk=2 # > 2 tasks considered 'a lot', for confirmation\n"
|
"bulk=2 # > 2 tasks considered 'a lot', for confirmation\n"
|
||||||
"nag=You have higher priority tasks. # Nag message to keep you honest\n" // TODO
|
"nag=You have higher priority tasks. # Nag message to keep you honest\n" // TODO
|
||||||
"search.case.sensitive=yes # Setting to no allows case insensitive searches\n"
|
"search.case.sensitive=yes # Setting to no allows case insensitive searches\n"
|
||||||
|
"active.indicator=* # What to show as an active task indicator\n"
|
||||||
|
"tag.indicator=+ # What to show as a tag indicator\n"
|
||||||
|
"recurrence.indicator=R # What to show as a task recurrence indicator\n"
|
||||||
"\n"
|
"\n"
|
||||||
"# Dates\n"
|
"# Dates\n"
|
||||||
"dateformat=m/d/Y # Preferred input and display date format\n"
|
"dateformat=m/d/Y # Preferred input and display date format\n"
|
||||||
|
|
|
@ -715,7 +715,8 @@ int handleConfig (std::string &outs)
|
||||||
"displayweeknumber echo.command fontunderline locking monthsperline nag "
|
"displayweeknumber echo.command fontunderline locking monthsperline nag "
|
||||||
"next project shadow.command shadow.file shadow.notify weekstart editor "
|
"next project shadow.command shadow.file shadow.notify weekstart editor "
|
||||||
"import.synonym.id import.synonym.uuid complete.all.projects "
|
"import.synonym.id import.synonym.uuid complete.all.projects "
|
||||||
"complete.all.tags search.case.sensitive hooks "
|
"complete.all.tags search.case.sensitive hooks active.indicator tag.indicator "
|
||||||
|
"recurrence.indicator "
|
||||||
#ifdef FEATURE_SHELL
|
#ifdef FEATURE_SHELL
|
||||||
"shell.prompt "
|
"shell.prompt "
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -511,7 +511,7 @@ int runCustomReport (
|
||||||
|
|
||||||
for (unsigned int row = 0; row < tasks.size(); ++row)
|
for (unsigned int row = 0; row < tasks.size(); ++row)
|
||||||
if (tasks[row].has ("start"))
|
if (tasks[row].has ("start"))
|
||||||
table.addCell (row, columnCount, "*");
|
table.addCell (row, columnCount, context.config.get ("active.indicator"));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (*col == "tags")
|
else if (*col == "tags")
|
||||||
|
@ -586,7 +586,7 @@ int runCustomReport (
|
||||||
|
|
||||||
for (unsigned int row = 0; row < tasks.size(); ++row)
|
for (unsigned int row = 0; row < tasks.size(); ++row)
|
||||||
if (tasks[row].has ("recur"))
|
if (tasks[row].has ("recur"))
|
||||||
table.addCell (row, columnCount, "R");
|
table.addCell (row, columnCount, context.config.get ("recurrence.indicator"));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (*col == "tag_indicator")
|
else if (*col == "tag_indicator")
|
||||||
|
@ -597,7 +597,7 @@ int runCustomReport (
|
||||||
|
|
||||||
for (unsigned int row = 0; row < tasks.size(); ++row)
|
for (unsigned int row = 0; row < tasks.size(); ++row)
|
||||||
if (tasks[row].getTagCount ())
|
if (tasks[row].getTagCount ())
|
||||||
table.addCell (row, columnCount, "+");
|
table.addCell (row, columnCount, context.config.get ("tag.indicator"));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (*col == "wait")
|
else if (*col == "wait")
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 7;
|
use Test::More tests => 9;
|
||||||
|
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'custom.rc')
|
if (open my $fh, '>', 'custom.rc')
|
||||||
|
@ -50,6 +50,10 @@ like ($output, qr/ID R/, 'Recurrence indicator heading');
|
||||||
like ($output, qr/3\s+R/, 'Recurrence indicator t1');
|
like ($output, qr/3\s+R/, 'Recurrence indicator t1');
|
||||||
unlike ($output, qr/2\s+R/, 'No recurrence indicator t2');
|
unlike ($output, qr/2\s+R/, 'No recurrence indicator t2');
|
||||||
|
|
||||||
|
$output = qx{../task rc:custom.rc foo rc.recurrence.indicator=RE 2>&1};
|
||||||
|
like ($output, qr/3\s+RE/, 'Custom recurrence indicator t1');
|
||||||
|
unlike ($output, qr/2\s+RE/, 'No custom recurrence indicator t2');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink 'pending.data';
|
||||||
ok (!-r 'pending.data', 'Removed pending.data');
|
ok (!-r 'pending.data', 'Removed pending.data');
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 7;
|
use Test::More tests => 9;
|
||||||
|
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'custom.rc')
|
if (open my $fh, '>', 'custom.rc')
|
||||||
|
@ -50,6 +50,10 @@ like ($output, qr/ID T/, 'Tag indicator heading');
|
||||||
like ($output, qr/1\s+\+/, 'Tag indicator t1');
|
like ($output, qr/1\s+\+/, 'Tag indicator t1');
|
||||||
unlike ($output, qr/2\s+\+/, 'No tag indicator t2');
|
unlike ($output, qr/2\s+\+/, 'No tag indicator t2');
|
||||||
|
|
||||||
|
my $output = qx{../task rc:custom.rc foo rc.tag.indicator=TAG 2>&1};
|
||||||
|
like ($output, qr/1\s+TAG/, 'Custom ag indicator t1');
|
||||||
|
unlike ($output, qr/2\s+TAG/, 'No custom tag indicator t2');
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
unlink 'pending.data';
|
unlink 'pending.data';
|
||||||
ok (!-r 'pending.data', 'Removed pending.data');
|
ok (!-r 'pending.data', 'Removed pending.data');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue