lsd icon indicating copy to clipboard operation
lsd copied to clipboard

[Feature request] Show Windows Attributes when running on Windows

Open RaffaeleBianc0 opened this issue 2 years ago • 3 comments

  • os: Win10pro
  • lsd --version: lsd 0.23.1

Expected behavior

dar-- 28/06/2021 13:33:00 4.0 KB  Users/ When run from a Windows machine, the first column could show the attributes the same way "Get-ChildItem" does on PowerShell on Windows.

Actual behavior

drwxrwxrwx 28/06/2021 13:33:00 4.0 KB  Users/

(thanks for this neat piece of software, i am using it every time!)

RaffaeleBianc0 avatar Jun 28 '23 08:06 RaffaeleBianc0

Hi @RaffaeleBianc0, I am not a windows user, can you explain some more about the dar--?

zwpaper avatar Jun 29 '23 16:06 zwpaper

Hi @zwpaper ! I believe those are the 5 standard attributes for Windows files/folders: d=directory a=archive r=read-only s=system h=hidden

I remember that since the old ages of MS-DOS, and I am pretty sure those still apply to the current Windows versions. Maybe there are further attributes above those 5, but I am not sure about this.

RaffaeleBianc0 avatar Jul 04 '23 07:07 RaffaeleBianc0

There is also l for links (e.g. symlinks / junctions)

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.3

By default Get-ChildItem lists the mode (Attributes), LastWriteTime, file size (Length), and the Name of the item. The letters in the Mode property can be interpreted as follows:

l (link) d (directory) a (archive) r (read-only) h (hidden) s (system)

eza uses these attributes for windows

domsleee avatar Sep 15 '23 10:09 domsleee