Verbosity
- Implemented new verbosity token 'new-id' which controls whether newly generated task IDs are reported.
This commit is contained in:
@@ -76,10 +76,10 @@ std::string Config::defaults =
|
||||
"edit.verbose=yes # Include comments in files created during task edit\n"
|
||||
"\n"
|
||||
"# Miscellaneous\n"
|
||||
"verbose=yes # Provide extra feedback\n"
|
||||
"verbose=yes # Provide maximal feedback\n"
|
||||
"#verbose=no # Provide minimal feedback\n"
|
||||
"#verbose=list # Comma-separated list. May contain:\n"
|
||||
"#verbose=blank,header,footnote,label\n"
|
||||
"#verbose=list # Comma-separated list. May contain any subset of:\n"
|
||||
"#verbose=blank,header,footnote,label,new-id\n"
|
||||
"confirmation=yes # Confirmation on delete, big changes\n"
|
||||
"echo.command=yes # Details on command just run\n"
|
||||
"annotations=full # Level of verbosity for annotations: full, sparse or none\n"
|
||||
|
||||
@@ -72,9 +72,8 @@ int CmdAdd::execute (std::string& output)
|
||||
context.tdb.add (task);
|
||||
|
||||
// TODO This should be a call in to feedback.cpp.
|
||||
#ifdef FEATURE_NEW_ID
|
||||
output = format (STRING_CMD_ADD_FEEDBACK, context.tdb.nextId ()) + "\n";
|
||||
#endif
|
||||
if (context.verbose ("new-id"))
|
||||
output = format (STRING_CMD_ADD_FEEDBACK, context.tdb.nextId ()) + "\n";
|
||||
|
||||
context.footnote (onProjectChange (task));
|
||||
|
||||
|
||||
@@ -110,7 +110,8 @@ int CmdDuplicate::execute (std::string& output)
|
||||
<< "'.\n";
|
||||
|
||||
// TODO This should be a call in to feedback.cpp.
|
||||
out << format (STRING_CMD_ADD_FEEDBACK, context.tdb.nextId ()) + "\n";
|
||||
if (context.verbose ("new-id"))
|
||||
out << format (STRING_CMD_ADD_FEEDBACK, context.tdb.nextId ()) + "\n";
|
||||
|
||||
context.footnote (onProjectChange (dup));
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#define INCLUDED_MAIN
|
||||
#define L10N // Localization complete.
|
||||
|
||||
#define FEATURE_NEW_ID 1 // Echoes back new id.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
Reference in New Issue
Block a user