jrnl-org / jrnl

Collect your thoughts and notes without leaving the command line.
https://jrnl.sh
GNU General Public License v3.0
6.49k stars 523 forks source link

Color settings not applied to every display format #1352

Open DSiekmeier opened 3 years ago

DSiekmeier commented 3 years ago

Bug Report

Environment

jrnl: v2.8.3
Python: 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
OS: Windows 10

Current Behavior

I set a color for the date, which works fine for the formats pretty and short. Using the format fancy the color is not applied.

Expected Behavior

Color should be applied for all display formats.

Repro Steps

Change the setting "colos / date" to BLUE. Ececute the commands below to see the differents:

jrnl.exe -to today --format short

and

jrnl.exe -to today --format fancy

Other Information

I did not thest other color settings than the one for the date.

micahellison commented 3 years ago

Thanks for filing this. It would be nice to have these colors set more consistently.

A fix for this would ideally set the settings for all display formats, and would be aware of whether or not jrnl is piping out to another program, so it could toggle color settings appropriately.

dufferzafar commented 2 years ago

@micahellison @wren Does coloring that was implemented as part of #692 not work on Windows?

image

micahellison commented 2 years ago

@micahellison @wren Does coloring that was implemented as part of #692 not work on Windows?

Hi @dufferzafar, it is working for me with both Windows Terminal and cmd.exe with the following environment:

jrnl: v2.8.3
Python: 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
OS: Windows 10

The default config doesn't have any colors set. Maybe that's the issue you're running into? Or perhaps something specific to your environment. Feel free to post a new bug with the details of your environment (especially if anything WSL-related is going on) if it's still not working for you.

dufferzafar commented 2 years ago

@micahellison Yeah, it was the config. Changing it worked. Any reason why we don't ship with colors by default?

micahellison commented 2 years ago

Any reason why we don't ship with colors by default?

I think it's just the case that nobody ever thought to do that when implementing this feature. But thanks for raising this question. I've filed it in #1372.