microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.32k stars 814 forks source link

Annoying highlighting which ruins visibility #10484

Closed dehlong closed 1 year ago

dehlong commented 1 year ago

Windows Version

Microsoft Windows [Version 10.0.19044.3448]

WSL Version

Invalid command line option: --version

Are you using WSL 1 or WSL 2?

Kernel Version

5.10.102.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

Go to a folder which has a subfolders, Run cd+TAB and you will see stupid folder highlighting: image

Expected Behavior

No highlight, just different color like in ls after fix: image

Actual Behavior

Highlighting that makes folders' names impossible to read: image

I have already managed to remove this thing for ls but it appears even with cd and no resources online mention the fix. I consider this a bug because it makes folders' names impossible to read with most popular terminal themes such as Nord, Gruvbox, Catpuccin, material, etc.

Diagnostic Logs

No response

elsaco commented 1 year ago

@dehlong Ubuntu has ls aliased to ls --color=auto. In a shell run type ls and you'll get ls is aliased to 'ls --color=auto' most likely. The stupid folder highlights are telling you those are directories and depending on you color scheme it could be hard to read. You get the same directory highlight when running ls in a powershell session. Use ls --color=never to hide them.

OneBlue commented 1 year ago

Indeed these directory are highlighted that way by design. To work around it I'd recommend switching your color theme or looking into overriding colors.

Closing since this is by design.

dehlong commented 1 year ago

Even with ls color never, they are still highlighted

No, this is a bug. Even if I set this to my zsh, which should prevent the folders highlighting in zsh, it does nothing: zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}" autoload -Uz compinit compinit

Fodlers are still highlighted as I showed So yes, this is a bug and no how it should be. In other linux distributions, issue like this is not present, just WSL