Skip to content
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

[Feature request] Show Windows Attributes when running on Windows #866

Open
RaffaeleBianc0 opened this issue Jun 28, 2023 · 3 comments
Open

Comments

@RaffaeleBianc0
Copy link

  • 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!)

@zwpaper
Copy link
Member

zwpaper commented Jun 29, 2023

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

@RaffaeleBianc0
Copy link
Author

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.

@domsleee
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants