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
Output of ls
or Get-ChildItem
has unexpected bg color for directories names
#18550
Comments
Configure
|
You will discover some other colouring applied to items in directory output - which you probably don't want either
Is a useful add on to many profiles. The powers that be believe most people want their directories to be blue because bash makes them blue, but it blue on black breaks the accessibility requirements for contrast so they have selected white on blue. A search should find the discussion on this. The important thing is you can set things exactly how you want them to be. |
If there is a desire to "do it like bash does it," then how about putting a |
Feel free to open a new issue/discussion on that however, the name of the property for |
Thanks Guys. |
It's the default in 7.3 yes. Not in 7.2 and earlier (it was an experimental feature in 7.2). See my post above for how to control it.
It would be pretty easy to add |
That's answers my question, Thanks @jhoneill |
So what was the default in 7.2 and earlier? Was it just normal text, or was it white? I frankly don't remember. |
@garretwilson There was no color, the color was determined by your console/terminal text color setting. |
Thanks, @ThomasNieto . So how do I tell PowerShell to go back to using the "no specific color". I don't want to set a new color. I want to tell PowerShell to go back to not having a special color for directories. |
@garretwilson look at @jhoneill comment. His code snippet does that. |
Well it's mixed in with several things. Not that it's not helpful. But to clarify, are you saying that it's this part? (I like to separate out and understand what I'm doing.) $PSStyle.FileInfo.Directory = "" |
@garretwilson the to turn all the colours off you can set Otherwise the noticeable update in 7.3 is that For other items If you don't like column headings and list labels in green then As with so much, it's very customizable if (like me) you don't like the defaults. |
Rephrasing out what was said above, for someone who is being bothered by this and is landing here out of the blue, and doesn't quite grasp what is happening, hoping that it is a bit more clear.
I found it a bit perplexing that a change like this was added, as the default behavior. Maybe there was a lot of people asking for it. Anyway, changing the background color of folders is just one of the options, it is actually pretty cool what can be done with PSStyle. I've found this blog post pretty good, explaining some neat things you can do. |
I have a problem reading things when there is movement, unexpected colours and a few other things on the screen, and find unix/linux seemingly random use of colours makes it much more difficult to read. There is a demand from people coming from other shells to be able to get the same colours, in particular "blue" for directory. However blue text on black fails accessibility tests for people with more common eyesight problems - who need more contrast, hence this compromise. A decision was "what seemed like a good idea to a dev at the time" colours to be opt out rather than opt in, so that people would know colour was available. I still contend that finding the opt out leaves a few people who want it off frothing-at-the-mouth angry, where an opt in would have left those who missed their linux colours feeling mild disappointment... however that argument was lost long ago. I turn it off in my profile, and if I need to test with |
Prerequisites
Steps to reproduce
Hello pwsh team,
Please check the screenshot below:
I have empty profile file under
Documents\PowerShell\Microsoft.PowerShell_profile.ps1
also no modules underDocuments\PowerShell\Modules\
.Could you please tell me where else should i check for such configuration?
Thanks
Expected behavior
Directories names has a transparent background color
Actual behavior
Directories names has a blue background color
Error details
No response
Environment data
Visuals
The text was updated successfully, but these errors were encountered: