- #1492 task show to display default values when appropriate (thanks to Renato
        Alves).
This commit is contained in:
Paul Beckingham 2014-01-26 12:58:53 -05:00
parent 149c3c8d9e
commit b354ed7bd2
8 changed files with 16 additions and 0 deletions

View file

@ -194,3 +194,4 @@ suggestions:
Scott Kroll
Kosta H
Hector Arciga
Renato Alves

View file

@ -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

1
NEWS
View file

@ -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

View file

@ -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);
}
}
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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