-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows colors #37
Windows colors #37
Conversation
This maintains most output styles, but removes coloring from output. On Windows, this is the default setting if Full would have been used
Thanks! Do you think this should be the default on Windows? I doubt that developers on Windows use |
Well, the default shell on modern Windows 10 has become powershell at this point. I would lean towards stating this provides a consistent user experience between both Windows shells. |
if options.output_style == OutputStyleOption::Basic { | ||
// We default Windows to NoColor if full had been specified. | ||
if cfg!(windows) && options.output_style == OutputStyleOption::Full { | ||
options.output_style = OutputStyleOption::NoColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If implemented in this way, there is no way to change to Full
on Windows, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s correct, on Windows, full is essentially NoColor. I felt that it would just improve consistency across shells on the platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For fd
, we ended up using this helper function: https://github.com/sharkdp/fd/blob/7a3994decb8b38162ef9f89d19e227569a379e81/src/windows.rs#L17-L39
I think we should definitely allow for a true Full
style on Windows. If someone uses cmd.exe
, he can use --style basic
or --style nocolor
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there’s nothing about the colours that don’t work on cmd or powershell, but they are just not properly visible on the default powershell background. I think we have two straightforward options: either we make full->full and auto->nocolor or change the current colour choices to properly be visible on the default powershell background. After thinking about this more the latter seems the most reasonable. My screenshot in the PR for enabling the progress bar shows the problem areas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, right. I'll merge this and if we want to enable color support on Windows, we should first update the colors.
This adds a new style value 'NoColor' that maintains most output styles, but removes coloring from output. On Windows, this is the default setting if Full would have been used.