diff --git a/ChangeLog b/ChangeLog index a868efc7e..c8ca627cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ + Added burndown charts - burndown.daily, burndown.weekly, burndown.monthly, that use color.burndown.pending, color.burndown.started and color.burndown.done colors. + + Added feature #247, providing infinite width reports when redirecting output + to a file, by setting defaultwidth to 0. + Added feature #546, which is a 'count' command that counts tasks, and is intended to help scripts that manipulate task output. + Fixed bug #515, which displayed an incorrect message after duplicating a diff --git a/NEWS b/NEWS index c44725301..bcab79b01 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ New Features in taskwarrior 1.9.4 - New burndown charts. - New 'count' helper command. + - Inifinite width reports, when redirecting output, by using rc.defaultwidth=0. Please refer to the ChangeLog file for full details. There are too many to list here. diff --git a/doc/man/taskrc.5 b/doc/man/taskrc.5 index 75e48dabc..4ea9cdee9 100644 --- a/doc/man/taskrc.5 +++ b/doc/man/taskrc.5 @@ -155,6 +155,8 @@ using, for text wrapping. .TP .B defaultwidth=80 The width of tables used when ncurses support is not available. Defaults to 80. +If set to 0, is interpreted as infinite width, therefore with no word-wrapping; +useful when redirecting report output to a file for subsequent manipulation. .TP .B editor=vi diff --git a/src/interactive.cpp b/src/interactive.cpp index 2b65ec51c..5add4e1e3 100644 --- a/src/interactive.cpp +++ b/src/interactive.cpp @@ -163,6 +163,10 @@ int Context::getWidth () debug (out.str ()); #endif + // A zero width value means 'infinity', which is approximated here by 2^16. + if (width == 0) + width = 65536; + return width; }