lsd icon indicating copy to clipboard operation
lsd copied to clipboard

Colouring logic and other adaptations for Windows not applied under WSL

Open matterhorn103 opened this issue 1 year ago • 3 comments

I can see from #712 that on Windows, lsd has been adapted so that it doesn't just colour every file on a Windows system as if it is executable.

However, when using lsd in a Linux distro via Windows Subsystem for Linux, the old behaviour is still present when browsing the "Windows side" of the file system.

In the screenshots you can see what I mean; they show two clones of the same repo, on the Linux part of the filesystem:

Screenshot 2024-06-29 145228

and on the Windows part:

Screenshot 2024-06-29 232807

I installed lsd for Windows too to check and in Powershell the colours are the correct ones for the same folder on the Windows side:

Screenshot 2024-06-29 233714

Ideally, for consistency, whatever logic is applied for the Windows version of lsd would also be applied to Windows files in WSL.

matterhorn103 avatar Jun 29 '24 21:06 matterhorn103

it's because of the permissions of files mounted by WSL, can you should them by ls -l and we can dig into it deeper.

zwpaper avatar Jun 30 '24 06:06 zwpaper

Well yes it's because they are all marked as executable, right? But on Windows lsd knows how to cope with this -- with lsd -l each file's line starts with .a--- ? ? and each directory with d---- ? ?, whereas under WSL the permissions for the same files are given as .rwxrwxrwx and drwxrwxrwx respectively.

matterhorn103 avatar Jun 30 '24 08:06 matterhorn103

Image here is a permission list

aryanthanam avatar May 29 '25 08:05 aryanthanam