Context: Introduce 'default' verbosity token

The purpose of this token is to control the display of information
messages about taskwarrior choosing a default action of some sort.
This commit is contained in:
Tomas Babej 2021-09-15 21:33:40 -04:00
parent 867efe3928
commit 712f0080dd

View file

@ -87,7 +87,7 @@ std::string configurationDefaults =
"\n" "\n"
"# Miscellaneous\n" "# Miscellaneous\n"
"# verbose= # Comma-separated list. May contain any subset of:\n" "# verbose= # Comma-separated list. May contain any subset of:\n"
"# affected,blank,context,edit,filter,footnote,header,label,new-id,new-uuid,override,project,recur,special,sync" "# affected,blank,context,default,edit,filter,footnote,header,label,new-id,new-uuid,override,project,recur,special,sync\n"
"verbose=affected,blank,context,edit,header,footnote,label,new-id,project,special,sync,override,recur\n" "verbose=affected,blank,context,edit,header,footnote,label,new-id,project,special,sync,override,recur\n"
"confirmation=1 # Confirmation on delete, big changes\n" "confirmation=1 # Confirmation on delete, big changes\n"
"recurrence=1 # Enable recurrence\n" "recurrence=1 # Enable recurrence\n"
@ -633,11 +633,13 @@ int Context::initialize (int argc, const char** argv)
foundAssumed = true; foundAssumed = true;
} }
if (verbose ("default")) {
if (foundDefault) if (foundDefault)
header ("[" + combined + "]"); header ("[" + combined + "]");
if (foundAssumed) if (foundAssumed)
header ("No command specified - assuming 'information'."); header ("No command specified - assuming 'information'.");
}
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// //