diff --git a/doc/man/taskrc.5.in b/doc/man/taskrc.5.in index d75f18925..9f271d870 100644 --- a/doc/man/taskrc.5.in +++ b/doc/man/taskrc.5.in @@ -347,9 +347,9 @@ names you have used, or just the ones used in active tasks. The default value i "no". .TP -.B print.empty.columns=yes +.B print.empty.columns=no May be yes or no, and determines whether columns with no data for any task are -printed. Defaults to yes. +printed. Defaults to no. .TP .B search.case.sensitive=yes diff --git a/src/Config.cpp b/src/Config.cpp index 39e2164f0..b43b9a245 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -289,7 +289,7 @@ std::string Config::_defaults = "complete.all.tags=no # Include old tag names in '_ags' command\n" "list.all.projects=no # Include old project names in 'projects' command\n" "list.all.tags=no # Include old tag names in 'tags' command\n" - "print.empty.columns=yes # Print columns which have no data for any task\n" + "print.empty.columns=no # Print columns which have no data for any task\n" "debug=no # Display diagnostics\n" "extensions=off # Extension system master switch\n" "fontunderline=yes # Uses underlines rather than -------\n" diff --git a/test/bug.455.t b/test/bug.455.t index df74e38eb..a27488cbc 100755 --- a/test/bug.455.t +++ b/test/bug.455.t @@ -34,6 +34,7 @@ use Test::More tests => 4; if (open my $fh, '>', '455.rc') { print $fh "data.location=.\n"; + print $fh "print.empty.columns=yes\n"; close $fh; ok (-r '455.rc', 'Created 455.rc'); diff --git a/test/bug.804.t b/test/bug.804.t index f5f1b0e62..c1f6c4d35 100755 --- a/test/bug.804.t +++ b/test/bug.804.t @@ -36,6 +36,7 @@ if (open my $fh, '>', 'bug.rc') print $fh "data.location=.\n"; print $fh "bulk=100\n"; print $fh "confirmation=no\n"; + print $fh "print.empty.columns=yes\n"; close $fh; ok (-r 'bug.rc', 'Created bug.rc'); } diff --git a/test/feature.print.empty.columns.t b/test/feature.print.empty.columns.t index ddcd947ab..eed9d4fc1 100755 --- a/test/feature.print.empty.columns.t +++ b/test/feature.print.empty.columns.t @@ -44,16 +44,16 @@ qx{../src/task rc:bug.rc add sample desc 2>&1}; qx{../src/task rc:bug.rc add withP project:house 2>&1}; my $output = qx{../src/task test sample rc:bug.rc 2>&1}; -like ($output, qr/Project/, 'empty \'project\' column is printed by default'); +unlike ($output, qr/Project/, 'empty \'project\' column is not printed by default'); -$output = qx{../src/task test sample rc.print.empty.columns:no rc:bug.rc 2>&1}; -unlike ($output, qr/Project/, 'empty \'project\' column is not printed if rc.print.empty.columns:no'); +$output = qx{../src/task test sample rc.print.empty.columns:yes rc:bug.rc 2>&1}; +like ($output, qr/Project/, 'empty \'project\' column is printed if rc.print.empty.columns:yes'); $output = qx{../src/task test rc:bug.rc 2>&1}; like ($output, qr/Project/, 'non-empty \'project\' column is printed by default'); -$output = qx{../src/task test rc.print.empty.columns:no rc:bug.rc 2>&1}; -like ($output, qr/Project/, 'non-empty \'project\' column is printed if rc.print.empty.columns:no'); +$output = qx{../src/task test rc.print.empty.columns:yes rc:bug.rc 2>&1}; +like ($output, qr/Project/, 'non-empty \'project\' column is printed if rc.print.empty.columns:yes'); # Cleanup. unlink qw(pending.data completed.data undo.data backlog.data synch.key bug.rc); diff --git a/test/verbose.t b/test/verbose.t index fec2ccf26..e6a9805c7 100755 --- a/test/verbose.t +++ b/test/verbose.t @@ -35,6 +35,7 @@ if (open my $fh, '>', 'verbose.rc') { print $fh "data.location=.\n", "echo.command=off\n"; + print $fh "print.empty.columns=yes\n"; close $fh; ok (-r 'verbose.rc', 'Created verbose.rc'); }