From 7a23b67020dd46e9cba8fa90cc95739a54f586ce Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 12 Jul 2010 02:06:46 -0400 Subject: [PATCH] Enhancement - Minimized the default .taskrc file that is generated. It now relies heavily on default values, but supplies data.location, and includes the default theme. - Updated taskrc.5 man page to include new depends column. --- ChangeLog | 3 +++ doc/man/taskrc.5 | 4 ++-- src/Config.cpp | 10 +++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c37f1db8..3bbfa8f32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,10 @@ 1.9.3 () + Added feature #423, now custom report filters allow rc overrides. + + New 'depends' column for custom reports. + Improved man pages (thanks to Andy Lester). + + Default .taskrc files are now largely empty, and rely almost completed + on default values. ------ old releases ------------------------------ diff --git a/doc/man/taskrc.5 b/doc/man/taskrc.5 index 3864e5b1b..24f767ead 100644 --- a/doc/man/taskrc.5 +++ b/doc/man/taskrc.5 @@ -758,8 +758,8 @@ The description for report X when running the "task help" command. The columns that will be used when generating the report X. Valid columns are: id, uuid, project, priority, priority_long, entry, entry_time, start, start_time, end, end_time, due, countdown, countdown_compact, age, age_compact, active, tags, -description_only, description, recur, recurrence_indicator, tag_indicator and wait. -The IDs are separated by commas. +depends, description_only, description, recur, recurrence_indicator, tag_indicator +and wait. The IDs are separated by commas. .TP .B report.X.labels diff --git a/src/Config.cpp b/src/Config.cpp index 01cb907bd..6c6b6d63d 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -55,6 +55,8 @@ std::string Config::defaults = "# variable= -- By specifying no value, this means no default\n" "# #variable=foo -- By commenting out the line, this uses the default\n" "\n" + "# Use the command 'task show' to see all defaults and overrides\n" + "\n" "# Files\n" "data.location=~/.task\n" "locking=on # Use file-level locking\n" @@ -472,7 +474,13 @@ void Config::createDefaultRC (const std::string& rc, const std::string& data) << "]\n" << defaults.substr (0, loc + 14) << data - << defaults.substr (loc + 21); + << "\n\n# Color theme\n" +#ifdef LINUX + << "include /usr/local/share/doc/task/rc/dark-256.theme" +#else + << "include /usr/local/share/doc/task/rc/dark-16.theme" +#endif + << "\n\n"; // Write out the new file. if (! File::write (rc, contents.str ()))