Verbosity

- Deprecated 'rc.edit.verbose'.
- Added support for verbosity token 'edit'.
- Updated documentation.
This commit is contained in:
Paul Beckingham 2011-10-01 11:34:05 -04:00
parent 8ccce069d9
commit 160c9708a5
6 changed files with 12 additions and 6 deletions

5
NEWS
View file

@ -70,7 +70,10 @@ Newly deprecated features in taskwarrior 2.0.0
- The 'next' configuration variable has been removed.
- Use of 'fg:' and 'bg:' attributes are deprecated.
- Use of 'echo.command' configuration variable.
- Use of 'echo.command' configuration variable. Use verbosity token
'affected' instead.
- Use of 'edit.verbose' configuration variable. Use verbosity token 'edit'
instead.
---

View file

@ -200,7 +200,7 @@ environment variables, before it defaults to using "vi".
When set to on (the default), helpful explanatory comments are added to the
edited file when using the "task edit ..." command. Setting this to off means
that you would see a smaller, more compact representation of the task, with no
help text.
help text. Deprecated - use verbosity token 'edit'.
.SS MISCELLANEOUS
@ -219,6 +219,7 @@ control specific occasions when output is generated. This list may contain:
label Column labels on tabular reports
new-id Provides feedback of any new task IDs
affected Reports 'N tasks affected' and similar
edit Used the verbose template for the 'edit' command
Note that the "on" setting is equivalent to all the tokens being specified,
and the "off" setting is equivalent to none of the tokens being specified.

View file

@ -75,13 +75,13 @@ std::string Config::_defaults =
"avoidlastcolumn=no # Fixes Cygwin width problem\n"
"hyphenate=on # Hyphenates lines wrapped on non-word-breaks\n"
"#editor=vi # Preferred text editor\n"
"edit.verbose=yes # Include comments in files created during task edit\n"
"edit.verbose=yes # Include comments in files created during task edit. Deprecated\n"
"\n"
"# Miscellaneous\n"
"verbose=yes # Provide maximal feedback\n"
"#verbose=no # Provide minimal feedback\n"
"#verbose=list # Comma-separated list. May contain any subset of:\n"
"#verbose=blank,header,footnote,label,new-id,affected\n"
"#verbose=blank,header,footnote,label,new-id,affected,edit\n"
"confirmation=yes # Confirmation on delete, big changes\n"
"echo.command=yes # Details on command just run. Deprecated\n"
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"

View file

@ -138,7 +138,8 @@ std::string CmdEdit::formatDate (
std::string CmdEdit::formatTask (Task task)
{
std::stringstream before;
bool verbose = context.config.getBoolean ("edit.verbose");
bool verbose = context.verbose ("edit") ||
context.config.getBoolean ("edit.verbose"); // Deprecated 2.0
if (verbose)
before << "# The 'task edit <id>' command allows you to modify all aspects of a task\n"

View file

@ -144,7 +144,7 @@ int CmdShow::execute (std::string& output)
" dom"
" due"
" echo.command" // Deprecated 2.0
" edit.verbose"
" edit.verbose" // Deprecated 2.0
" editor"
" exit.on.missing.db"
" export.ical.class"

View file

@ -51,6 +51,7 @@ unlike ($output, qr/Logged task/, '\'affected\' verbosity good');
# TODO Verbosity: 'label'
# TODO Verbosity: 'header'
# TODO Verbosity: 'footer'
# TODO Verbosity: 'edit'
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key verbose.rc);