diff --git a/AUTHORS b/AUTHORS index 7e25d62e8..af495f903 100644 --- a/AUTHORS +++ b/AUTHORS @@ -194,3 +194,4 @@ suggestions: Scott Kroll Kosta H Hector Arciga + Renato Alves diff --git a/ChangeLog b/ChangeLog index 19f9ade52..3dcf26325 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2.4.0 () - Features + + #1492 task show to display default values when appropriate (thanks to Renato + Alves). + Removed deprecated 'echo.command' setting, in favor of the 'header' and 'affected' verbosity tokens. + Removed deprecated 'edit.verbose' setting, in favor of the 'edit' verbosity diff --git a/NEWS b/NEWS index c15164756..a2e310ba9 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ New Features in taskwarrior 2.4.0 + - The 'show' command displays default configuration values, when appropriate. - Removed deprecated commands 'push', 'pull' and 'merge'. New commands in taskwarrior 2.4.0 diff --git a/src/commands/CmdShow.cpp b/src/commands/CmdShow.cpp index 80b34fa79..cd3f65e25 100644 --- a/src/commands/CmdShow.cpp +++ b/src/commands/CmdShow.cpp @@ -295,6 +295,14 @@ int CmdShow::execute (std::string& output) int row = view.addRow (); view.set (row, 0, i->first, color); view.set (row, 1, value, color); + + if (default_config[i->first] != value && + default_config[i->first] != "") + { + row = view.addRow (); + view.set (row, 0, std::string (" ") + STRING_CMD_SHOW_CONF_DEFAULT, color); + view.set (row, 1, default_config[i->first], color); + } } } diff --git a/src/en-US.h b/src/en-US.h index 5e74af37f..57b33ead1 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -763,6 +763,7 @@ #define STRING_CMD_SHOW_LOC_EXIST "Configuration error: data.location contains a directory name that doesn't exist, or is unreadable." #define STRING_CMD_SHOW_CONF_VAR "Config Variable" #define STRING_CMD_SHOW_CONF_VALUE "Value" +#define STRING_CMD_SHOW_CONF_DEFAULT "Default value" #define STRING_CMD_SHOWRAW "Shows all configuration settings in a machine-readable format" // Task diff --git a/src/es-ES.h b/src/es-ES.h index 6665f8ec3..acaa46330 100644 --- a/src/es-ES.h +++ b/src/es-ES.h @@ -777,6 +777,7 @@ #define STRING_CMD_SHOW_LOC_EXIST "Error de configuración: data.location contiene un nombre de directorio que no existe o no se puede leer." #define STRING_CMD_SHOW_CONF_VAR "Variable Config" #define STRING_CMD_SHOW_CONF_VALUE "Valor" +#define STRING_CMD_SHOW_CONF_DEFAULT "Default value" #define STRING_CMD_SHOWRAW "Muestra todas las variables de configuración en un formato legible por la máquina" // Task diff --git a/src/fr-FR.h b/src/fr-FR.h index 780c4bf7c..23c0d31e0 100644 --- a/src/fr-FR.h +++ b/src/fr-FR.h @@ -763,6 +763,7 @@ #define STRING_CMD_SHOW_LOC_EXIST "Configuration error: data.location contains a directory name that doesn't exist, or is unreadable." #define STRING_CMD_SHOW_CONF_VAR "Config Variable" #define STRING_CMD_SHOW_CONF_VALUE "Value" +#define STRING_CMD_SHOW_CONF_DEFAULT "Default value" #define STRING_CMD_SHOWRAW "Shows all configuration settings in a machine-readable format" // Task diff --git a/src/it-IT.h b/src/it-IT.h index 710a2fdf5..4f83fd555 100644 --- a/src/it-IT.h +++ b/src/it-IT.h @@ -764,6 +764,7 @@ #define STRING_CMD_SHOW_LOC_EXIST "Errore di configurazione: data.location contiene una directory che non esiste o non è leggibile." #define STRING_CMD_SHOW_CONF_VAR "Variabile di configurazione" #define STRING_CMD_SHOW_CONF_VALUE "Valore" +#define STRING_CMD_SHOW_CONF_DEFAULT "Default value" #define STRING_CMD_SHOWRAW "Mostra le impostazioni di configurazione in formato processabile" // Task