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

Use eza instead of GNU ls #1595

Open
krakotay opened this issue Jul 18, 2024 · 4 comments
Open

Use eza instead of GNU ls #1595

krakotay opened this issue Jul 18, 2024 · 4 comments

Comments

@krakotay
Copy link

krakotay commented Jul 18, 2024

In windows eza works better than ls, especially on Windows

PS C:\Users\krakotay\Downloads> fd -e torrent -d 1
[NNMClub.to]_Windows Server 2022 LTSC [10.0.20348.2527], Version 21H2 (Updated June 2024) - Original'nyie obrazyi ot Microsoft MSDN [Ru_En].torrent
debian-12.6.0-amd64-DVD-1.iso.torrent
PS C:\Users\krakotay\Downloads> fd -e torrent -d 1 -l
ls: ./[NNMClub.to]_Windows Server 2022 LTSC [10.0.20348.2527], Version 21H2 (Updated June 2024) - Original'nyie obrazyi ot Microsoft MSDN [Ru_En].torrent: No such file or directory
-rw------a  1 Администраторы   298k июл 18 15:03 .\debian-12.6.0-amd64-DVD-1.iso.torrent
PS C:\Users\krakotay\Downloads> eza -la '.\[NNMClub.to]_Windows Server 2022 LTSC [10.0.20348.2527], Version 21H2 (Updated June 2024) - Original''nyie obrazyi ot Microsoft MSDN [Ru_En].torrent'
-a--- 115k 18 Jul 14:56 .\"[NNMClub.to]_Windows Server 2022 LTSC [10.0.20348.2527], Version 21H2 (Updated June 2024) - Original'nyie obrazyi ot Microsoft MSDN [Ru_En].torrent"
PS C:\Users\krakotay\Downloads> ls.exe '.\[NNMClub.to]_Windows Server 2022 LTSC [10.0.20348.2527], Version 21H2 (Updated June 2024) - Original''nyie obrazyi ot Microsoft MSDN [Ru_En].torrent'
C:\Users\krakotay\.cargo\bin\ls.exe: .\[NNMClub.to]_Windows Server 2022 LTSC [10.0.20348.2527], Version 21H2 (Updated June 2024) - Original'nyie obrazyi ot Microsoft MSDN [Ru_En].torrent: No such file or directory

Yes, for example, with this path eza can see all files, but GNU ls can't.
And GNU ls have some other problems, for example:

PS C:\Users\krakotay> fd -t l -u -d 1
Application Data
Cookies
Local Settings
NetHood
PrintHood
Recent
SendTo
Мои документы
Шаблоны
главное меню
PS C:\Users\krakotay> fd -t l -u -d 1 -l
ls: ./Шаблоны: No such file or directory
ls: ./Мои документы: No such file or directory
lr-s--h---  1 Администраторы      0 июл  7 19:26 .\Application Data -> C:\Users\krakotay\AppData\Roaming
lr-s--h---  1 Администраторы      0 июл  7 19:26 .\Cookies -> C:\Users\krakotay\AppData\Local\Microsoft\Windows\INetCookies
lr-s--h---  1 Администраторы      0 июл  7 19:26 .\Local Settings -> C:\Users\krakotay\AppData\Local
lr-s--h---  1 Администраторы      0 июл  7 19:26 .\NetHood -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\Network Shortcuts
lr-s--h---  1 Администраторы      0 июл  7 19:26 .\PrintHood -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
lr-s--h---  1 Администраторы      0 июл  7 19:26 .\Recent -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\Recent
lr-s--h---  1 Администраторы      0 июл  7 19:26 .\SendTo -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\SendTo
lr-s--h---  1 Администраторы      0 июл  7 19:26 .\главное меню -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\Start Menu
PS C:\Users\krakotay> eza -allah
Mode  Size Date Modified Name
d----    - 18 Jul 16:09  .
da---    -  7 Jul 19:26  ..
d----    - 10 Jul 23:49  .cache
d----    - 16 Jul 20:48  .cargo
d----    -  8 Jul 12:30  .conda
d----    -  9 Jul 18:58  .config
d----    - 15 Jul 23:32  .dotnet
d----    - 14 Jul 12:29  .ipython
d----    - 13 Jul 15:01  .matplotlib
d----    - 15 Jul 01:21  .rustup
d----    - 14 Jul 13:27  .space
d----    - 11 Jul 21:08  .ssh
d----    - 14 Jul 00:16  .templateengine
d----    -  7 Jul 21:52  .vscode
d-r--    -  7 Jul 19:26  '3D Objects'
d----    -  8 Jul 22:04  [-OtherParameters
d----    -  7 Jul 21:37  ansel
da-h-    -  7 Jul 19:26  AppData
l--hs    0  7 Jul 19:26  'Application Data' -> C:\Users\krakotay\AppData\Roaming
d-r--    -  7 Jul 19:26  Contacts
l--hs    0  7 Jul 19:26  Cookies -> C:\Users\krakotay\AppData\Local\Microsoft\Windows\INetCookies
d-r--    - 12 Jul 22:01  Desktop
d-r--    - 18 Jul 15:13  Documents
d-r--    - 18 Jul 15:09  Downloads
d-r--    -  7 Jul 19:26  Favorites
d-r--    -  7 Jul 19:26  Links
l--hs    0  7 Jul 19:26  'Local Settings' -> C:\Users\krakotay\AppData\Local
d----    - 14 Jul 13:48  miniconda3
d-r--    -  7 Jul 19:26  Music
l--hs    0  7 Jul 19:26  NetHood -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\'Network Shortcuts'
-a-h- 5.2M 18 Jul 13:10  NTUSER.DAT
-a-hs 606k  7 Jul 19:26  ntuser.dat.LOG1
-a-hs 1.4M  7 Jul 19:26  ntuser.dat.LOG2
-a-h- 262k  7 Jul 19:21  NTUSER.DAT.NotTweaked
-a-hs  66k 15 Jul 02:03  NTUSER.DAT{a0928411-2baa-11ef-8c83-e0d55ea263be}.TM.blf
-a-hs 524k 15 Jul 02:03  NTUSER.DAT{a0928411-2baa-11ef-8c83-e0d55ea263be}.TMContainer00000000000000000001.regtrans-ms
-a-hs 524k  7 Jul 19:26  NTUSER.DAT{a0928411-2baa-11ef-8c83-e0d55ea263be}.TMContainer00000000000000000002.regtrans-ms
---hs   20  7 Jul 19:26  ntuser.ini
d-r--    -  7 Jul 19:26  Pictures
l--hs    0  7 Jul 19:26  PrintHood -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\'Printer Shortcuts'
l--hs    0  7 Jul 19:26  Recent -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\Recent
d-r--    -  7 Jul 19:26  'Saved Games'
d----    -  8 Jul 22:08  scoop
d-r--    -  7 Jul 19:27  Searches
l--hs    0  7 Jul 19:26  SendTo -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\SendTo
d-r--    - 15 Jul 00:44  Videos
l--hs    0  7 Jul 19:26  'главное меню' -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\'Start Menu'
l--hs    0  7 Jul 19:26  'Мои документы' -> C:\Users\krakotay\Documents
-a---    5 18 Jul 16:09  тест.txt
l--hs    0  7 Jul 19:26  Шаблоны -> C:\Users\krakotay\AppData\Roaming\Microsoft\Windows\Templates

I think that gnu ls has some problems with cyrillic in Windows, but eza works perfectly

@krakotay
Copy link
Author

upd: and this one. yes, I can even use fd with eza with all functionality, but it can be better with eza as -l as default
image

@krakotay
Copy link
Author

image
well, I did it myself. Just replaced all "ls" and "gls" in main.rs to "eza", and it works...

@tavianator
Copy link
Collaborator

I'd suggest just implementing --list-details entirely within fd rather than shelling out to an external program

@j-fu
Copy link

j-fu commented Oct 10, 2024

May be at once this could allow to use the yaml based color theme handling from eza ?

EDIT: Ok I found out about LS_COLORS and vivid, re-bikeshedded colors forced this now upon eza. Less nice, but obviously a kind of quasi-standard, and now I have consistent colors.

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