CmdSync: Color only used for tty
This commit is contained in:
@@ -182,8 +182,13 @@ int CmdSync::execute (std::string& output)
|
||||
std::string code = response.get ("code");
|
||||
if (code == "200")
|
||||
{
|
||||
Color colorAdded (context.config.get ("color.sync.added"));
|
||||
Color colorChanged (context.config.get ("color.sync.changed"));
|
||||
Color colorAdded;
|
||||
Color colorChanged;
|
||||
if (context.color ())
|
||||
{
|
||||
colorAdded = Color (context.config.get ("color.sync.added"));
|
||||
colorChanged = Color (context.config.get ("color.sync.changed"));
|
||||
}
|
||||
|
||||
int download_count = 0;
|
||||
payload = response.getPayload ();
|
||||
|
||||
@@ -289,7 +289,7 @@ static void colorizeDeleted (Task& task, const Color& base, Color& c, bool merge
|
||||
void autoColorize (Task& task, Color& c)
|
||||
{
|
||||
// The special tag 'nocolor' overrides all auto and specific colorization.
|
||||
if (!context.color () ||
|
||||
if (! context.color () ||
|
||||
task.hasTag ("nocolor"))
|
||||
{
|
||||
c = Color ();
|
||||
|
||||
Reference in New Issue
Block a user