Live data from Hacker News

Exa, a modern replacement for ls

the.exa.website

331–340 of 420 posts

Re: Exa, a modern replacement for ls

#331

> For example, exa prints human-readable file sizes by default (when would you not want that?) When I've got two similar but non-identical files, and I think that the difference between their sizes might be important. That's a silly nitpick, though. It's not like I lose ls by installing exa. Plus, it's a nice excuse to see if I can get cargo working around the corporate firewall.

I'll repeat this here: export TIME_STYLE=long-iso export BLOCK_SIZE="'1" The first option gives ISO dates, the second the thousands separator. You need a locale for a thousands separator, en_GB here: $ ls -on i* -rw-rw-r-- 1 1001 1,335 2017-06-16 14:31 icon-shelters.svg -rw-r--r-- 1 1001 1,633,946 2016-11-07 14:50 insects.png -rw-r--r-- 1 1001 1,445,837 2016-11-18 10:32 ix Block size: https://www.gnu.org/software/cor…

Thank you! I couldn't live without the alias I use for ls, which specifies BLOCKSIZE with the tick. Now I am going to add TIME_STYLE, which I didn't know about but I love already.

The rendering of time in any format other than ISO-8601 is a pet peeve of mine. It always baffles me why people do it.

Re: Exa, a modern replacement for ls

#332

Wow, the comments in this thread are quite harsh. Even though I might not use it, this looks like an awesome project - kudos to the author for finding (& implementing) ways to improve something as mundane as ls. I've long been stuck on finding a suitable (perfect?) project idea to play with Rust but exa is making me think through again! Thanks for sharing this and also for your screencasts. I'd definitely spend a laz…

Wow, the comments in this thread are quite harsh. I wonder if a lot of that has to do with how it's being "marketed" --- it might just be me, but whenever I see "modern" being used to describe something, it evokes the negative connotations of being trendy, fashionable, boring, vapid, fleeting, style-over-substance that's all too common with software today (Windows' "modern UI/Metro" being one of the first examples to…

>I wonder if a lot of that has to do with how it's being "marketed" --- it might just be me, but whenever I see "modern" being used to describe something, it evokes the negative connotations of being trendy, fashionable, boring, vapid, fleeting, style-over-substance that's all too common with software today

For me, when I see people waxing poetically about the unix way and the old, crufty, POSIX userland, it's all about cargo cult, "that's how things have always been", minimum viable progress while keeping compatibility, and heritage-over-substance.

Re: Exa, a modern replacement for ls

#333
post #188
post #118

Earlier quoted context omitted.

exa can be typed by using three different fingers. Its not any significantly longer then ls which use two finger movement. Maybe even faster: I dont know what science tells us about such motions, but at my opinion fingers of one hand can be more precisely synchronized, so you really can do faster movements and lower delays between keypresses. Just try to use fingers 2-1-4 (index finger, than thumb, than ring finger)…

maybe i'm typing wrong, but i want to hit "e" and "x" with the same finger, which makes it way slower to type than ls. things that can't be typed w/o moving your fingers from the home row are really easy to type.

> things that can't be typed w/o moving your fingers from the home row are really easy to type.

That's why some people (like me) switched to Dvorak.

Your sentence on Qwerty was 43 top, 21 middle and 12 bottom row keypresses.

On Dvorak, it's 24 top, 45 middle and just 7 bottom row characters, twice as good!

"ithout" is also entirely home-row, so you wouldn't need to bother with "w/o". The word demonstrates Dvorak's other feature nicely, hand alternation and outward-to-inwards flow:

  without
  ,gkjsfk (Qwerty equivalent)
  RLRRLLR
The letter pairs typed with the same hand go smaller-to-big finger, since "th" (Qwerty "kj") is much easier to type than "ht" ("jk") -- and "th" occurs about 7x as often in English as "ht".

Re: Exa, a modern replacement for ls

#334

> For example, exa prints human-readable file sizes by default (when would you not want that?) When I've got two similar but non-identical files, and I think that the difference between their sizes might be important. That's a silly nitpick, though. It's not like I lose ls by installing exa. Plus, it's a nice excuse to see if I can get cargo working around the corporate firewall.

My problem is that I like having full and exact file sizes, and I like that they really make order-of-magnitude differences stand out in a listing (by taking up an extra column); but if I look at a number longer than five or so digits it's difficult to quickly see how many digits it is, and hence my quick glance can be off by an order of magnitude. In a program that natively makes strong use of colour, though, here's…

Or just use ls -l --block-size=\'1 (make sure your locale is set properly). This way not only your interactive output is fixed, but also any place where it's redirected to text.

Re: Exa, a modern replacement for ls

#335
post #270

Earlier quoted context omitted.

> So colors by default? Thanks but no thanks. Is the problem really that there are colors, or that the colors used don't work well for colorblindness? Do you find coloring that doesn't go afoul of your particular type of colorblindness still less useful than no coloring, or is it just that so often little attention is paid and an assumption is made that it's no worse than monochrome when in actuality it sometimes is?…

From my experience as a colorblind person, the use of color to convey information falls into several categories. 1. It improves the presentation of information. The vast majority of colorblind can still see color. In this respect, we are no different from people who have normal color vision. 2. It has no impact upon the presentation of information. In these cases, the colors may not be distinguishable but there are o…

Does it not make sense for the colourblind person to adjust the colour definitions for their terminal, so all programs give acceptable output? Just as a myopic person may increase the font size.

I don't think it's colourblindness, but I have trouble reading ANSI blue, which xterm defaults to rgb(0, 0, 238). I've changed it to be a roughly Persian green colour rgb(0, 166, 147).

If I had the most common male colourblindness, I'd probably add some orange to the default reds.

https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

Re: Exa, a modern replacement for ls

#336
i know this may sound trivial, but I'd probably never use this just because typing exa is a lot more annoying than typing ls. The three letters are on the left side of the keyboard and on the three rows. Sure I could rename it to something I like, but then I won't be able to get used to it, because I won't be able to find it when I log on to other computers. It's a silly thing that has a serious impact on usability...

Re: Exa, a modern replacement for ls

#337

> For example, exa prints human-readable file sizes by default (when would you not want that?) When I've got two similar but non-identical files, and I think that the difference between their sizes might be important. That's a silly nitpick, though. It's not like I lose ls by installing exa. Plus, it's a nice excuse to see if I can get cargo working around the corporate firewall.

I'll repeat this here: export TIME_STYLE=long-iso export BLOCK_SIZE="'1" The first option gives ISO dates, the second the thousands separator. You need a locale for a thousands separator, en_GB here: $ ls -on i* -rw-rw-r-- 1 1001 1,335 2017-06-16 14:31 icon-shelters.svg -rw-r--r-- 1 1001 1,633,946 2016-11-07 14:50 insects.png -rw-r--r-- 1 1001 1,445,837 2016-11-18 10:32 ix Block size: https://www.gnu.org/software/cor…

Sadly not supported by BSD ls.

Re: Exa, a modern replacement for ls

#338
post #178

Earlier quoted context omitted.

Writing `ls` is the first thing I do when learning a new language.

Hah, interesting! Mine is writing a simple web server (sockets, IO, string handling) and an ultra-simple command line browser (args handling, 3rd party libs for URLs, HTML parsing, etc.)

A friend of mine used to learn new languages by implementing Tetris in them.

Sad to say I'm here years later and I still haven't even implemented Tetris once in anything.

Re: Exa, a modern replacement for ls

#339
post #165

Earlier quoted context omitted.

grep does have `--color=auto`, though, which checks whether you're printing to a terminal or not. exa's opinion is this: users shouldn't be expected to know that adding colour to ANSI terminal output adds more bytes to the stream. If you run `foo`, see that it outputs a line, then run `foo | grep line`, you'd expect to see that line without having to stop and think about what representation the colours had. Yeah, it'…

> it's annoying that less is one of the few programs that doesn't alter its input and would be a perfect use case for reading in ANSI codes. I'm not certain if it's exactly what you're getting at, but less can be instructed to parse ANSI color sequences, and output them, with the -R flag. (If you forget to put -R on the command line, or some utility automatically starts less for you, you can also type "-R" while in l…

That's where you need something like PowerShell, which pipes objects around instead of streams of bytes which are probably text.

Of course, PowerShell has its own issues, but the idea of a shell with more meaning attached to things is appealing. Rebuilding an ecosystem that can handle it all though... not so plausible!

Re: Exa, a modern replacement for ls

#340
post #330

Earlier quoted context omitted.

I think what's really in discussion here is what the default should be. ls was originally conceived and implemented in a period when all the files you would be dealing with could be measured in bytes easily, and would almost never be over four digits. Many common files today (any MP3, most word processing documents, almost every image except for thumbnails, etc) are nine or more digits, and at that level it's very ea…

I think you mean 6 or more digits? I have yet to see a multigigabyte document. Even mp3s that size are extremely rare. Even then, most of my documents are quite a bit smaller, as I have a tendency to write my documents in wordpad instead of office, and then save as rtf or txt.

I meant seven or more, see the sibling comment. Seven digits is a megabyte or more. That encompasses most single song mp3s, some medium to large size documents, etc.

I'm not sure why I said nine, seven is what I was thinking of.

Post reply on HN