# exa is a modern replacement for ls



## NapoleonWils0n (Mar 15, 2020)

exa is a modern replacement for the command-line program ls that ships with Unix and Linux operating systems.

Its written in rust and use's the same command line options as ls plus a few new features,
like a header in long view, tree view, git integration, grid view and lots of colours


----------



## Alain De Vos (Mar 15, 2020)

& you can pipe the output through more.
[/bin/ls --locor not]


----------



## wolffnx (Mar 15, 2020)

il apreciate the effort for create a new tool,but..why reinventing the wheel?


----------



## Alain De Vos (Mar 15, 2020)

because ls and gnuls are not perfect ?


----------



## unitrunker (Mar 15, 2020)

You reach a point where you may as well use a file manager.


----------



## George (Mar 15, 2020)

MIT License. I like it.


----------



## Cthulhux (Mar 15, 2020)

Being written in Rust is not a feature.


----------



## Crivens (Mar 15, 2020)

If it was Fortran, I'd be curious. But you can write good code in almost any language.


----------



## JohnnySorocil (Mar 15, 2020)

How to use it as replacement for "ls -ltr"? I can simulate that with

```
alias ls='exa  --time-style long-iso --classify'
alias lltr='ls -l --sort newest'
```
But then thing I got used to doesn't work:

```
ll -tr
Option --time (-t) has no "r" setting (choices: modified, changed, accessed, created)
To sort oldest files last, try "--sort oldest", or just "-sold"
```

Any ideas?


----------



## Cthulhux (Mar 15, 2020)

Crivens said:


> If it was Fortran, I'd be curious. But you can write good code in almost any language.



Except JavaScript.


----------



## 20-100-2fe (Mar 15, 2020)

Rewriting something that works well since the 70s just for "modernity"?
It seems like some people have quite a lot of free time out there.
I wish I had as much!


----------



## 20-100-2fe (Mar 15, 2020)

And by the way, it seems systemd has inspired exa's output formatting.
At last, systemd has been good at something!


----------



## kpedersen (Mar 15, 2020)

This could have easily been written in C and then might have a chance at being included in a base. Rust is not portable enough to be a candidate compiler for base applications.

And a folder lister is not something I would ever bother to install from ports (unfortunately because it looks fairly cool).


----------



## drhowarddrfine (Mar 15, 2020)

There is zero improvement or benefit over `ls` in the mention that makes me want to use this non-standard port and I never will.


----------



## Crivens (Mar 15, 2020)

Guys, someone had fun writing this. So let's acknowledge that, and don't burn it to the ground. Maybe it was only an exercise, no problem with that. Ok?


----------



## a6h (Mar 15, 2020)

Rust is short on Diamonds but long on show-off. Ask Judas!
Anyway(Z!), I'm throwback, sh/c is the way to go.


----------



## wolffnx (Mar 15, 2020)

Alain De Vos said:


> because ls and gnuls are not perfect ?


maybe, in my opinion I'dont like it,but like I'say, someone take the time to make this and I'respect for that,
but the word "Replacement" sounds to me like "Ls is old,lets write  new one and take ls out"
systemd shi#..style behavior


----------



## NapoleonWils0n (Mar 15, 2020)

I see the luddites are out in force 
Get the pitchforks and flaming torches out and storm the castle

Simple test of ls vs exa to show why its actually useful

Recursively list a directory with ls -lR 
vs exa -lT tree view listing and be honest which is easier to read


```
ls -lR
```






```
exa -lT
```





You can turn off all the colours in exa or customize them


----------



## Beastie7 (Mar 15, 2020)

I think a user is better off with a file manager if one needs this kind of explicitness. FreeBSD's adherence to POLA kind of makes this whole thing unnecessary IMO as well.

It looks cool though.


----------



## NapoleonWils0n (Mar 15, 2020)

Using a file manager on unix seems pointless to me
I just use the terminal and mv, cp etc


----------



## wolffnx (Mar 16, 2020)

gpb said:


> My user account is fairly new, but it isn't my first time here.  I previously had an account for several years with hundreds of posts, but due to attitudes of other members like most of what I've read in this thread, I left for a couple of years.  When I decided to return I couldn't remember my password so created a new account.
> 
> Prior to this thread I've reacted to the same kind of negativity in a couple of other threads, which had the same attitudes.
> 
> ...



go for it   ..follow your heart?


----------



## shkhln (Mar 16, 2020)

gpb said:


> It appears that time may have come for me to abandon this forum a second time - and probably for good.



Don't. Somebody must counterbalance Cthulhuxes.


----------



## PMc (Mar 16, 2020)

Actually I would like to have this as the output of `svnlook tree`.


gpb said:


> Prior to this thread I've reacted to the same kind of negativity in a couple of other threads, which had the same attitudes.



Oh, we dont want "negativity" here? That reminds me... of certain very creepy esoteric self-awareness workshops... very spiritual and very enlightenend - and very dishonest, btw.

I suggest You look a bit closer. Then You see someone coming along and rightways declaring a "replacement" for ls. ls, which is used in millions of shellscripts, depending on the exact output. And it really doesn't help that we have already been thru that, when the Linuxians came along and put in a colored ls - and all kind of stuff did break due to the ansi codes. 
Then, one indeed shouldn't judge people by their names, but I think the nickname of the proposer also doesn't help for acceptance. 
So, all together, I don't think the "negativity" comes unwarranted.

Nevertheless, if I were a newbie, I would like such an output - not as a "replacement", but as a nice add-on.


----------



## shkhln (Mar 16, 2020)

I observe a lot of people shouting their personal grievances into the void. What was the topic again?


----------



## Cthulhux (Mar 16, 2020)

This one went well.
Now excuse me while I do some Plan 9 things.


----------



## eternal_noob (Mar 16, 2020)

A few suggestions to actually make this useful (in no particular order):

Rewrite in C
Don't advertise it as a 'replacement' for `ls`, this systemd attitude is scary
Have a command line switch which allows backward compatible / same output like `ls`
Choose another name (EXA is a graphics acceleration architecture of the X.Org Server)
Fix those issues (having a leap year bug is pretty dangerous, having it for 4 years already is ridiculously irresponsible)


----------



## 20-100-2fe (Mar 16, 2020)

PMc said:


> Oh, we dont want "negativity" here? That reminds me... of certain very creepy esoteric self-awareness workshops... very spiritual and very enlightenend - and very dishonest, btw.



It's much more severe than just esoteric workshops: in our brave new world, disagreeing, or simply not applauding - i.e. being "negative" - has become a crime. It is true in the workplace, but is also more an more common in interpersonal, non-professional relationships.


----------



## 20-100-2fe (Mar 16, 2020)

freebsd_noob said:


> Fix those issues (having a leap year bug is pretty dangerous, having it for 4 years already is ridiculously irresponsible)



Another issue (#590) points out the author reimplemented some stdlib functions.
This may explain the very surprising bugs reported about date formatting.


----------



## ralphbsz (Mar 16, 2020)

I  have no problem with exa, judging just by what little was shown here. I see it being in rust as no problem. If that makes the author(s) productive, good for them.

It doesn't replace ls. ls is still needed, partially for POSIX completeness, partially for use in scripts. Sure, one could make exa be a complete superset of ls ... but that would amount to just re-implementing the wheel, and this time getting it less round.

Tree viewers for directory structures are old and common. "Tree" has been around for ages. The fact that I haven't installed it in the last ~15 years tells me that I have no need for them. 

I would not use exa, nor would I install it. But if others like it, I have no problem with that.


----------



## Cthulhux (Mar 16, 2020)

ralphbsz said:


> ls is still needed, partially for POSIX completeness



Arguably, the POSIX completeness of today's non-commercial operating systems is atrocious. Where's SCCS?


----------



## kpedersen (Mar 16, 2020)

gpb said:


> I'm sure many here use Go, and if it wasn't for Plan 9, alef, Inferno, and Limbo, there many never have been any Go.



I like Plan 9 but only the good parts.

Alef and Limbo lead the industry down a very dark path of an architecture necessitating huge bloated unportable VMs required to process bytecode. The (many the same) developers have realized that and are trying to undo the pain that they have caused by Golang going *back* to native and static compilation using (until semi-recently a modified ~C99 compiler (Ken's C Compiler from Plan 9)).

Without this error, we would not have had crudware like JVM, .NET or Flash.
So basically, sometimes it *is* better to do nothing at all.

In theory, without Plan 9, we may have had something like Go 10 years earlier because people would be focusing on language improvement rather than trying to maintain VMs or fix their shortcomings.

(Also the requirement of the mouse is another bit of evidence that Plan 9 didn't get everything right).


----------



## Cthulhux (Mar 16, 2020)

kpedersen said:


> In theory, without Plan 9, we may have had something like Go 10 years earlier because people would be focusing on language improvement rather than trying to maintain VMs or fix their shortcomings.



Alef and Limbo were pet projects by rob, not crucial parts of the Plan 9 operating system development.



kpedersen said:


> (Also the requirement of the mouse is another bit of evidence that Plan 9 didn't get everything right).



I disagree. The mouse is one of the best IT inventions from the 1980s and I find it disappointing that people still prefer to simulate teletype devices.


----------



## drhowarddrfine (Mar 16, 2020)

gpb said:


> It is quite sad to see the negativity instead of encouragement


Encouragement should be for things that are dramatically different and useful. If one comes up with a mouse trap that snaps five percent faster, you won't get encouragement. Encouragement for the sake of encouragement is something you get from your Mom. Then saying it replaces the tried-and-true with minor improvements, then you're asking for negative comments.


----------



## wolffnx (Mar 16, 2020)

gpb said:


> As expected, some people can't help themselves.  Say whatever you prefer because I won't read it.
> 
> Of course, as shown by the few responses already, there is no self reflection.  Very pathetic.
> 
> Good luck.  Please delete my account.


please...help me to help you..to help to others to think like you
nothing personal ,but if somebody insult me like you do (i'am a new member but feel part of the FreeBSD comunity)
you know the answers you will get
maybe if you write a tool that replace `cp` command because if cold and ugly for one that do:
-colored output (like the hackers movies)
-a web browser built in
-a file manager too
-a ssh server
-and make you cofee, but you need the plugin(is all writen in java,so it well be fast,why we need C ? is old and ugly)

but..please, follow the light and comeback to iluminate  all


----------



## kpedersen (Mar 16, 2020)

Cthulhux said:


> Alef and Limbo were pet projects by rob, not crucial parts of the Plan 9 operating system development.


That is good to hear. I always thought that Plan 9 had some great innovations but really dropped the ball when it came to these. Just 5c, 6c, 7c alone was a great idea (for handling more than intel architecture) when it came to language technology. Shame the industry didn't adopt the good part.



Cthulhux said:


> I disagree. The mouse is one of the best IT inventions from the 1980s and I find it disappointing that people still prefer to simulate teletype devices.



For consumer use, yes absolutely (including touchpad / tablet screen). I am also not using that term in an arrogant way. When I am off duty and just want to switch to a different film, I do *not* want to have to type anything to do so!

But for an environment where it is predominantly command line tools (which Plan 9 was by design), the mouse simply did not offer enough. It makes it hard to use in VMs, serial debugging. Even today it is awkward because you needed a true three button mouse (most laptops do not have that and requires emulation).

I am no usability expert and since we still have both approaches; there is probably no correct answer. But to enforce the use of a mouse (which Plan 9 did), is certainly not correct.


----------



## Cthulhux (Mar 16, 2020)

kpedersen said:


> Shame the industry didn't adopt the good part.



The _good part_ of Plan 9 was the perfection of its "everything is a file" scheme: The Acme "text editor" exposes a file system for its toolbar, another file system for its file buffer, yet another file system for the second buffer, ... - I wish 9P (or 9P2000, Styx or whatever) was more common today. I know that Microsoft has adopted _some of_ it for its WSL2 system, there's also _/proc_, but that's about it, sadly.

One could debate about whether _rio_ was a good part as well, though.



kpedersen said:


> for an environment where it is predominantly command line tools (which Plan 9 was by design), the mouse simply did not offer enough.



Plan 9 follows a similar user interface as vi/Vim: The mouse is your "command mode", the keyboard is your "insert mode". I wonder why people understand Vim but fail to see the benefits of Plan 9.



kpedersen said:


> Even today it is awkward because you needed a true three button mouse



Or one with a clickable wheel and a not-too-esoteric mouse driver. Which are most mice.  Then again, if you don't have an actual mouse, you probably don't want to require one in the first place and Plan 9 might not be for you.


----------



## kpedersen (Mar 16, 2020)

Cthulhux said:


> you probably don't want to require one in the first place and Plan 9 might not be for you.



Ugh, don't remind me. As part of my thesis I made two ports of software to Plan 9, a simple software renderer (I originally wrote on MS-DOS) and my network implementation of OpenGL (OpenGL|Distributed) so that I could measure some performance characteristics. It required a fair number of changes (especially in the networking system to use "dial" and other Plan 9 facilities) so I had to pick up acme which I found fairly nice (it was cool how text could be piped to commands) even if it looked a bit messy with my "saved commands" in the toolbars etc.

I really wanted to like Plan 9 and for the underlying system, I really found the architecture elegant, it was really clean. I even liked the UI and how minimal it was. However, what it did not have was a proper terminal and that crucified my productivity. No history, etc. (I couldn't even use arrow keys in acme to go up a line, even though that was not terminal related).

In the end I had to compile up the Vim port and use that for pretty much everything; it provided a better terminal emulation than Plan 9. I did manage to avoid APE however and all the code was the Plan 9 way. Including <u.h> at the top of most compilation units was weird though haha.

Screenshot of possibly one of the few 3D programs you will see running on Plan 9. Compared to Doom (or Quake) this did not run fast however (in pure software mode) .


----------



## Alain De Vos (Mar 16, 2020)

shkhln said:


> I observe a lot of people shouting their personal grievances into the void. What was the topic again?


The time it takes to compile RUST from source.


----------



## Cthulhux (Mar 16, 2020)

kpedersen said:


> (I couldn't even use arrow keys in acme to go up a line, even though that was not terminal related).



Try edwood on your favorite OS. 
IIRC, it can do that.


----------



## kpedersen (Mar 16, 2020)

Cheers, I will look into that. It is a slight shame it drags in plan9port which is a little large just for an editor but on many of my development machines I have that installed anyway 

A lighter alternative is Wily (https://en.wikipedia.org/wiki/Wily) but unfortunately is not quite as featureful as acme and had an X11 bug that I couldn't quite manage to fix.


----------



## Cthulhux (Mar 17, 2020)

In my opinion, Wily makes no sense anymore when you already have plan9port. If you prefer a low overhead, Acme2k might be an alternative as a drop-in replacement for Acme. (But, unlike Acme, it still doesn’t support files with spaces in their paths.)


----------



## kpedersen (Mar 17, 2020)

Cthulhux said:


> In my opinion, Wily makes no sense anymore when you already have plan9port. If you prefer a low overhead, Acme2k might be an alternative as a drop-in replacement for Acme.



Yes, that is very true.
Acme2k now supports cursor movement using keyboard (my only gripe with standard Acme), so I will certainly try this and edwood out.


----------



## ShelLuser (Mar 17, 2020)

I think the majority of the negativity comes from the way this was presented..  "_A modern replacement_"?  That also makes me go "whatever..." because I can't help pick up some arrogance in there as well. Probably not intended and I'm well aware that I might be oversensitive there but yah... "_It's a modern alternative for ls_"  would have made this sound a lot milder.

Sure, this is nitpicking. But what would you expect after seeing some dweebs (= personal opinion) trying to replace the foundation of Linux / Unix through systemd?

Just my 2 cents here of course.


----------



## eternal_noob (Mar 17, 2020)

ShelLuser said:


> I think the majority of the negativity comes from the way this was presented..


Not to forget the ignorance of the developer having a leap year bug for 4 years already. Like Poettering says "It's not a bug, it's a feature".


----------



## Alain De Vos (Mar 17, 2020)

I'm waiting for someone to rewrite it in dart language.


----------

