11 ms·
Exa, a modern replacement for ls
- sethammons 9y agoso... a mix up of the following: which ls alias ls='ls --color=auto' /bin/ls tree -L 2 git diff --stat git status
- jeroenjanssens 9y agoSometimes the Unix philosophy has to be taken with a grain of salt.
- jamescostian 9y agoRight but with more colors (e.g. you can get small files to have their file size be in green and large files have their filesize in yellow - the scale of color tells you how big a file is) and the summary from git-diff --stat is nicely fitted into a single, small column. Certainly not life changing, but after using it for a while, I can tell you that every time I'm on a machine that doesn't have exa, I feel so frustrated ls doesn't give me everything exa has. I often end up downloading exa on any machine that doesn't have it
- JustSomeNobody 9y agoBut this is "Modern". The problem I see with these "modern" command replacements is 1) muscle memory and 2) I have to log into some old systems that simply will not have anything this "modern".
- Karunamon 9y agoAn alias in your favorite shell's .rc file solves the first problem. Better yet, you can throw it behind a test block to ensure you never get a command not found error: test -f /usr/bin/exa && alias ls='/usr/bin/exa' The second problem is solved by configuration management tools pushing out your desired tools to your entire environment.
- mmirate 9y ago> configuration management tools Which work well until your "entire environment" is some new-fangled ARM/SuperH/(etc.) board, and your configuration management tool is x86_64-only and/or not-in-the-repo of the only distro specialized enough to support that new-fangled board.
- balls187 9y agoSure, but it's easy enough to fall back after you get the command error. If you want, you can alias it to `ls` so you don't lose muscle memory.
- deleted 9y ago[deleted]
- steventhedev 9y agoIs this intended as a full on ls replacement? As in, does it respect the envvars such as lscolors? Will it silently ignore -h, or will it die violently?
- djm_ 9y agoFrom the FAQ: >Is this a drop-in replacement for ls? No — exa has, in my opinion, much saner defaults than ls, so while the available command-line options are similar, they are not exactly the same. Most of the common options will work consistently, though. For example, exa prints human-readable file sizes by default (when would you not want that?) so ls -h no longer applies.
- wnissen 9y agoBut a length in bytes is even better than human-readable: it's a graph (technically a histogram), so it can be scanned, which is even faster than reading. It's far faster to identify the smallest or largest file in a directory with standard ls. There are some times when I do want human readable, but then I typically want to specify the units, so I see everything in megabytes.
- doubleunplussed 9y agoExactly - it's a logarithmic scale bar chart!
- SmirkingRevenge 9y agoWhat you are looking for is `ls -S` and `ls -Sr`
- mbrumlow 9y agoI almost never use the human-readable file sizes. For this to get any traction it is going to need to accept every argument ls does and play nicely. Most people who work with nix systems work on many systems and some of them don't control the software loaded on them. If I have to remember that on this* system I have to use these arguments because I have exa, vs this system I have normal ls that is going to be a deal breaker for many.
- amelius 9y agoDoes it take into account the background color of my xterm so things do not become unreadable?
- twic 9y agoI have an unreasonable and unquenchable hatred for developers who assume that their users have dark-background terminals. Honestly, the most insanely passionate contempt.
- cannam 9y agoDrives me a bit nuts too, and I would disagree with some of the other things in this page as well (e.g. the preference for "human-readable" file sizes). But there is a great joy in being able to release a new utility and say about it, "This is how it should work." It reflects your own desires, you understand it, you made the decisions that went into it and have actually thought about the alternatives. There's a delight there. It could be a sign of a piddling egotist, or of a developer who is excited about what real users get to see. (I did this sort of thing once -- reimplementation of commonly-used, if more niche, thing + manifesto -- from more than 20 years ago: http://all-day-breakfast.com/wm2/ http://all-day-breakfast.com/wm2/) My main hope for anyone doing this kind of thing is that not too many people actually use it. You don't want to get stuck supporting a tool like this for the world and its dog.
- thecrazyone 9y agoCool windows manager :thumbsup: Tilting my head every time I wanted to read a title, I didn't fancy though :)
- fnj 9y ago> "human-readable" file sizes). Nothing is more human readable than "123,456,789", so I think the problem is just the way you go about making them human readable. I couldn't agree more that lurching between B, kB, MB, and GB just because the file size changes it extremely jarring and disconcerting, and actually makes comparing the size much more difficult.
- amelius 9y agoWhat is the usefulness/learning_effort ratio of this tool?
- Touche 9y agoYou can pretty much use it like ls for most things, so I'd say very little investment needed.
- pbiggar 9y agoThis is really cool - bringing the great treatment of `ack` to ls. And can confirm how fast it is! The unix philosophy is a great idea, but it doesn't really lead to a good experience. Glad people are making more integrated tools! Oh, and It's in homebrew already: `brew install exa`
- zokier 9y ago> The unix philosophy is a great idea, but it doesn't really lead to a good experience. Glad people are making more integrated tools! Bit ironical, as ls already is pretty "non-unixy" and has way too many features tacked into it. From purism point of view it would make more sense that ls would be just a list of files and let other utilities (stat, sort, etc) handle the rest.
- graysonk 9y agoThat would be great. Probably about 40% of all issues in bash scripts I see is people trying to parse ls because they don't know other tools. It would be amazing if ls reigned in the features some so people learned better tools.
- thecrazyone 9y agoThat's got UX backwards. You'd want to minimize the effort user has to make, no?
- graysonk 9y agoI don't really think that minimizing user efffort was part of the Unix philosophy, but rather to have tools do one thing well and be able to become input to another program that does something else well.
- cytzol 9y agoWhen I release a new version of exa, I upload the code and binaries to GitHub, and then someone else whom I have never met but very much appreciate takes it and publishes it to Homebrew, then a few days later I download and start using it. It's the slowest file copy mechanism I've ever used!
- general_pizza 9y agoThis is heavily influenced by personal taste, but I don't understand the value of having so many elements of the output colorized. File type seems a useful case, everything else in the output of `exa -l` just looks distracting to me. Just my 2 cents.
- arkitaip 9y agoThe more design elements you add - colors, type, graphics etc - the more distracting the design get and the more conflict there is between the design elements. By colorizing everything here, nothing is important anymore. It's just poor usability and design.
- cytzol 9y ago(author here) You know what's funny? Every time I have to use ls, I'm so used to seeing the colours that I have so much trouble finding anything. Which column in the permissions is group-read? I can just scan for the green one. Which file in the listing am I supposed to be looking at? I just look for the one with the yellow underline. Colours have familiarity to me in a way that letters and words do not -- if I expect to see green and instead see grey, I'll notice it faster than if I expected to see "r" and instead see "-". Of course, not everyone feels this way. Colour terminals are not a new invention, and if the "colour in everything" crowd was larger, someone would have made exa sooner. That said, I don't want to go too overboard with the colours. Here's an example: when exa was in its infancy I had the bright idea to highlight the root user in red, in the same way that it highlights your current user in yellow, because, I don't know, root is "dangerous" or something. I ended up seeing so many red usernames that I stopped seeing it as "dangerous, beware" and started seeing it as "just another file" -- which completely defeated the point! Now, red is a lot more scarce (just +w permission and inodes. probably some file types. not many)
- antjanus 9y agoI'm a big fan of this colorization. I like that I can quickly scan permissions, take note of the user, and figure out what kind of file I'm looking at. With regular 'ls', I usually have to do a double-take on all of those.
- mavhc 9y agoexa is hard to type, bad choice of name for something I'd be typing many times a day
- kowdermeister 9y agoI thought the same at first. ls is good mnemonic for list, but what exa stands for and why three letters? "gf" for example would be better. neighbor characters on the keyboard, could stand for get files.
- Denvercoder9 9y agoFurthermore, l and s are typed with different hands, which makes it quite fast to type. Exa is all left-handed, so it takes even longer.
- ordu 9y agoexa 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) in that order, and you'll see. Or, when typing exa as part of larger text, you can use 3-1-4 sequence of fingers it allows to place palm in a way that allows fast movement into "exa" or out of it, keeping index finger free.
- dilap 9y agomaybe 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.
- Symbiote 9y ago> 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".
- assafmo 9y agoThe main problem I can think of is that I'm so used to type cd and then ls... But OTOH it's as simple to fix as alias ls=exa EDIT: "exa prints human-readable file sizes by default (when would you not want that?)" I actually use bytes a lot for certain progress calculations. Also I get an error "exa: error while loading shared libraries: libhttp_parser.so.2.1: cannot open shared object file: No such file or directory" (Ubuntu 17.04)
- PascLeRasc 9y agoYeah, the 'cd' and 'ls' combo is so easy to type too. 'exa' feels more difficult since my left middle finger has to contort a little going from e to x.
- erichurkman 9y agoWhy does a directory lister need an HTTP parser?
- rrdharan 9y agoI am wondering that too, but FWIW `sudo apt-get install libhttp-parser2.1` will have you on your way.
- assafmo 9y agoThanks, but I wanted to report it nevertheless because it says the file is self contained.
- steveklabnik 9y agoA bug was filed a week ago https://github.com/ogham/exa/issues/194 https://github.com/ogham/exa/issues/194
- steveklabnik 9y agoThis binds to libgit2, which binds to curl. I believe that brings it in.
- otterpro 9y agoIt feels like swiss army knife of 'ls' that tries to do everything in one, and I hope more features are added, such as showing directory size, which would be a killer feature. I hate using 'du' or 'ncdu'. I installed in Ubuntu (and WSL) by downloading the zip file and also 1 dependency by `sudo apt-get install libgit2-24' Edit: It's also fast, and I'm beginning to think Rust is really good for making speedy commandline tool, as I'm a big fan of 'ripgrep', another popular tool written in Rust.
- nonsince 9y agoRust is my favourite language for code that has to run on end-users' computers. It's also my favourite language in general, but for that specific usecase it's leagues ahead of the competition in my opinion.
- hk__2 9y ago> I hate using 'du' Why? On the other hand, I like to have small tools that do one thing and do it well, and that you can combine to do more powerful things. Personal preference, I guess.
- johnny22 9y agohmm, but is it important that the small tools are actually developed separately? or just that you can call them separately? An example would be busybox, which can decide which executable to pretend to be by the target name.
- deleted 9y ago[deleted]
- emodendroket 9y agoI think in a lot of cases it's kind of nice to just get this all in one command.
- prewett 9y agoIn my case the problem is I'm running out of disk space and need to find stuff to delete. So, `du -csh `. Wow, three huge directories. `cd dir1; du -csh `. Repeat. `du -d 3` would seem to be the solution, but it is pretty noisy. I really want something that prints all the "big" stuff in a tree, nicely indented and sorted by size. I end up using a KDE app ported to macOS that shows all the big files in packed rectangles, but can't remember the name.
- donatj 9y agoI set up $LS_COLORS like 15 years sgo in my .zshrc… and haven't had to touch it since. Doesn't seem like a huge deal worth replacing it over.
- laurent123456 9y agoIt's not exactly the same though. LS_COLORS only colours file types (whether it's a file, dir or symlink) and permissions, while exa appears to also set the colours based on the mime type (text, image, etc.).
- vanjoe 9y agoI'm pretty sure ls does this as well. At least for images and archives
- DonaldPShimoda 9y agoSpecifically, you list which extensions should get what colors. So it's more like telling ls "Color anything ending in .jpg or .gif in red", as opposed to "Color all images red".
- rubatuga 9y agoSeems like it comes on by default in Ubuntu/Debian based systems for bash. Also, if you want to see the file sizes in MB, KB etc. then use 'ls -lh' command.
- tadzik_ 9y ago> exa is written in Rust, so it’s small I suspected this would be total bullshit, and it is. Its small binary is a mere 3.4 megabytes. I wonder if I misinterpreted the "small" part.
- nonsince 9y agoCompared to JavaScript, one would guess. Rust is capable of generating extremely small binaries but none of the compiler's defaults are amenable to it
- steveklabnik 9y agoAs usual, you have to consider static vs dynamic linking, all sorts of other stuff. Good overview and HN discussion of this: https://news.ycombinator.com/item?id=11823949 https://news.ycombinator.com/item?id=11823949
- wongarsu 9y agoIt's a lot bigger than conventional ls, but compared to a node.js implementation or Java program the description "small, fast" seems justified.
- hak8or 9y agoWell, I have to admit, it is smaller than a docker container of alpine Linux containing the ls binary! Still doesn't mean it's monstrously large for no good reason.
- Sharlin 9y agoWhy would I want to compare apples to oranges? Though admittedly in this crazy day and age someone has probably already reimplemented coreutils in node.js just because.
- wongarsu 9y agoI have seen my fair share of javascript-based console applications. My guess is that the author tries to assure us that exa is no such thing but behaves reasonably for a console application (not gigantic, not incredibly slow) and makes his statements in that light.
- 0x006A 9y agoso whats the replacement for sl in that case? can't live without it
- peacetreefrog 9y agocool. i feel like this whole thread is the epitome of hacker news comments
- rc_kas 9y agoWhat do all the colors mean? I wish he would make a little page explaining what I'm looking at and what each color means.
- cytzol 9y agoI know the documentation is currently lacking -- I've been working on a better website that explains all the options and colours for a while now. It should be done Soon™
- jwilk 9y ago> Git support: View the staged and unstaged status of every file, right there in the standard view. Also works in tree view. This is nearly impossible to implement securely. Better don't run exa against untrusted directories.
- steveklabnik 9y agoIt uses libgit2 for this; I don't know what specific attack vector you're thinking about though.
- lima 9y agoGit's on disk format has a massive attack surface. Do not run "git" in untrusted directories. It is not hardened against that (as opposed to the network protocol). That probably includes libgit2 unless it explicitly states the opposite.
- jwilk 9y agoThe blurb made it sound like it checks the git status by default. But this isn't the case. You have to explicitly ask for with --git. Never mind then.
- urda 9y agoCan you please expand on your comment? It currently makes zero sense with zero references.
- bsmit 9y agoWhat does "exa" stand for? That's what I want to know.
- MBlume 9y agoexamine?
- landhar 9y agoI'm guessing it's short for examine
- cytzol 9y ago"Like an engineer deeply in tune with his machine, Exa feels the world's component error deep in his bones, fractionally before anything has literally gone wrong." — from Sam Hughes's Ra (https://qntm.org/ra https://qntm.org/ra) It was originally going to be a command-line "file explorer" like ranger, and exa is kind of short for explorer, but I like this quote too.
- khedoros1 9y ago> 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.
- blunte 9y agoI agree. Relativity is important - uniform units.
- Houshalter 9y agoYou would never say that you are 0.0018 kilometers tall. Using sane unit sizes is important. If two files are orders of magnitude different in size, it's easy to tell that just by the units. As opposing to counting the number of digits, which is tedious and error prone. If they are similar, then it's easy enough to tell that also. E.g. 1 GB vs 995 MB.
- blunte 9y agoIndeed, but you are speaking of relativity on a smaller scale. The problem is, at a glance, seeing 990KB flash by next to 1MB, you will mentally categorize them very differently. I would prefer to choose the base unit and see the decimals myself. Then I can quickly ascertain the difference.
- beagle3 9y agoBut unless they are differently colored, if you are looking at a column of 50 numbers, all 100-500 except only two of them have an "M" suffix and the rest have "K", it is very easy to miss. From experience with "du -h" which I rarely use anymore because of this,
- khedoros1 9y agoWell, right, 180cm would be a customary way to show that (probably wouldn't be shot for saying 1.8m either). And 32GB for an SD card, or whatever. But then you run into the case that the "32GB" SD image that you just dd'd won't copy to another card of the same nominal size, because it turns out that the destination card has reduced capacity due to 100KB of bad sectors, or something. Or your file went from 2100 bytes to 2081 bytes because your editor dropped all the \r characters. Or a network transfer ended a bit prematurely, chopping off the end of a file. I'd consider these to be reasonable cases where the byte-exact filesize might be more useful than the readability-friendly version of the number. On the other hand, yeah, there are a lot of cases where I just need a general idea of the filesize. "-h" display is wonderful for that.
- hepek 9y ago./exa-linux-x86_64: error while loading shared libraries: libhttp_parser.so.2.1: cannot open shared object file: No such file or directory Couldnt all the dependencies be statically linked for max portability?
- steveklabnik 9y agoIn general, they could. As always, it's a tradeoff. See the above thread about binary size...
- cytzol 9y agoThis took me by surprise too. For some reason it isn't happening in the Vagrant VM I develop on, but now I've run it on my VPS, it's totally there! exa uses libgit2 which must be requiring it somehow. The GitHub issue offers a fix for Ubuntu: https://github.com/ogham/exa/issues/194 https://github.com/ogham/exa/issues/194
- ktRolster 9y agoIs there a reason it has an http parser?
- steveklabnik 9y agohttps://news.ycombinator.com/item?id=14924128 https://news.ycombinator.com/item?id=14924128
- brainfire 9y agoJust make sure you update exa when there's a vulnerability in whatever got statically linked to it.
- Froyoh 9y agoWow I’m quite overwhelmed by the colors
- git-pull 9y agoWhile it's not the intention to replace the binary itself, I'm just not a fan of the idea of substituting system built-ins in everyday behavior. Stuff like cd, ls, etc. I like to keep it to the basics. Even just with PATHs or aliases, or a new binary entirely. And I'm a person who is no stranger to dot-configs. I've never taken it as far as Z(1), https://github.com/rupa/z https://github.com/rupa/z. A system builtin is stuff you'd see stowed away in /bin. They are essential low level binaries you have to trust. If somehow a malicious ls got out there, nothing's stopping people from writing memory-safe malware that uploads your $HOME configs to some server in a far away land. The more I say this, I guess defaulting to a substitute for a builtin command doesn't matter. The average developer relies on so much third party stuff in their shell, vim, package manifests, and so on that all these years could have done bad stuff, nothing has happened. Maybe it's my defense mechanism firing that my own dot-config has grown so big I don't remember what the hell's in it anymore. In fact, it's a common thing for terminal applications to accept environmental variables to use third party applications. For instance, $EDITOR, and less often (but no less useful): $PAGER. You can give it a shot with most(1) [1], I mention it in my book, The Tao of tmux [2] (available free to read online). So also, regarding $EDITOR, if you prefer that being in GNU nano, Pico, Vim, or emacs, set it in your .bashrc/.zshrc: export EDITOR=vim Also, for git's editor, I don't remember if it falls back to $EDITOR, but you can do: export GIT_EDITOR=vim Another tool at your disposal for ls(1), which even FreeBSD supports, it $LS_COLORS: http://man7.org/linux/man-pages/man5/dir_colors.5.html http://man7.org/linux/man-pages/man5/dir_colors.5.html edit: actually, BSD's ls(1) seems to be $LSCOLORS (https://www.freebsd.org/cgi/man.cgi?query=ls&sektion=1 https://www.freebsd.org/cgi/man.cgi?query=ls&sektion=1): [1] http://www.jedsoft.org/most/ http://www.jedsoft.org/most/ [2] https://leanpub.com/the-tao-of-tmux/read#leanpub-auto-read-the-tmux-manual-in-style https://leanpub.com/the-tao-of-tmux/read#leanpub-auto-read-t...
- steveklabnik 9y agoGiven that the FAQ says that this isn't a drop-in replacement, I don't think they're a fan either.
- lobster_johnson 9y agoIt's not overriding anything, so you're ranting against a faulty premise. The command is called "exa", not "ls", and it isn't even a drop-in replacement -- it doesn't have the same flags. You can't alias "ls" to it.
- kbutler 9y agoInteresting that they chose to keep the file name on the right-hand side like ls, and unlike every graphical file manager. The name is the key field and so it should generally be the left-most column.
- omribahumi 9y agoI guess that's because you can't resize columns interactively on the console, and the other columns are relatively short (and pretty much static length). It makes sense to list the filename last IMHO.
- dmckeon 9y agoThe file name (or entire path) should be where-ever the user expects to find it. Having fixed width columns makes using sort(1) trivial. For the "all the information" part, I've been using something like this: fn () { find "${@:-.}" -printf "%TY %Tm %Td %TH:%TM:%2.2TS %1y %4m %3n %4U:%-3G %8s %p\n"; }
- polote 9y agoWhy do you want to replace ls?
- pierrec 9y ago>although Rust is cross-platform, I don’t have a Windows machine to develop on... Well, Windows VMs aren't hard to come by and they work quite well on any host platform (contrarily to some other OSes coughMacOScough) A native windows version would be interesting, though I believe people generally shun any prolonged interactive use the windows command line, this kind of tool might be one of the possible remedies against the pain of using it.
- cytzol 9y agoTo the credit of both Microsoft and the Rust team, Windows has become a much easier platform to develop on than when that sentence was written!
- burntsushi 9y agoAs a maintainer of a CLI program in Rust that runs on Windows, it is mostly a pretty nice experience. The only painful part was getting colors working in both MSYS terminals and cmd/PowerShell based terminals. I do have a Windows 7 VM setup for testing, but I also bought a cheap Windows 10 laptop to test on as well.
- thecrazyone 9y agoYou should probably write to exa developer, no? Perhaps, help out a fellow tool developer to bring the goodness of your tools to us devs on Windows? :)
- burntsushi 9y agoIt's available as a library: https://docs.rs/termcolor/0.3.2/termcolor/ https://docs.rs/termcolor/0.3.2/termcolor/
- thecrazyone 9y agoThe developer in me jumps with joy when the existence of (us poor) devs on Windows is acknowledged and gosh, even prioritized ("no v1.0 before windows"). I'm a fan for you just saying that! PS: I develop on Windows
- _jal 9y agoIt is great to scratch an itch and make something behave exactly as you want it to be - kudos. That said, this is very much not for me. Default-colorized is something I emphatically do not want; defaulting to relative units, ditto. It it were me, the first thing I would do is get rid of 'grid' display entirely - reading across just doesn't work for me. Etc. More prosaically, `ls` is sort of like breathing for me - I do it so much during the average day that I don't even think about it. Can't say I immediately know every one of the switches, but probably 10 or so variants I use daily are pure muscle memory, and less frequently used things (extended attributes, symlink-deref options, etc.) I can remember without the man page. So in that sense, `ls` is well into the same category as vi for me - I'm so accustomed to whatever warts there may be that switching would be much more painful than any efficiency gain.
- raides 9y agoI do not think I could have said it any better. Absolutely fabulous work to the developer. I am just not his userbase.
- cestith 9y agoI might be in his userbase part of the time. It seems exa does have some features I'd find handy once in a while in addition to ls. I think "replacement" is going too far for me. Some of the subthreads talking about actually aliasing 'ls' to 'exa' sound to me like they're going to break some little-known features on their systems. I'm in the "potential supplement" camp I guess.
- moxious 9y agoThat muscle memory must have taken quite some time to develop. Here's to a future where the legions of programmers coming down the pike don't have to spend that investment to get the same or better result.
- vacri 9y agoWhat's your proposed method for getting tailored, filtered output to your transient requirements, without expending so much effort as two keypresses?
- Perceptes 9y agoIf you're interested in learning Rust by watching someone work, the author did several long screencasts of himself working on exa: https://www.youtube.com/channel/UCoBjY7TeCXzOULdiE40Ig1w https://www.youtube.com/channel/UCoBjY7TeCXzOULdiE40Ig1w
- copperx 9y agoIs this a trend? Learning by seeing someone write a program? Because I find it neat.
- swift 9y agoThe feature I'd be most interested in here is the integration with git, but I don't see an example on the site that demonstrates that. If the author is reading this, could you please add one? (Or maybe point it out, if I'm just missing it?)
- hgdsraj 9y agoYah there's git integration, re read site ctrl+f "git"
- bowmessage 9y agoswift knows that. They're asking for an example of the output of exa in a git repo.
- dilap 9y agoif you pass --long --git you'll have a column that shows git status. using color to show git status in normal view would be much more interesting to me.
- cytzol 9y agoYou're right -- I missed it out! Could have sworn I put one in one of the screenshots, too... In any case, I've been working on a new site for exa, with much better documentation and actual explanations for what the features are, and that has one in it. So you'll have to wait a bit longer I'm afraid. (I could link a screenshot here if you'd like one)
- krat0sprakhar 9y agoWow, 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 lazy evening watching you program exa.
- yegle 9y agoWriting `ls` is the first thing I do when learning a new language.
- jayvanguard 9y agoHah, 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.)
- jamescostian 9y agoAnd all along I thought I was creative for skipping "Hello, World" and going straight to "Hello, World" 10 times
- sabujp 9y agomine is doing everything in hackerrank in the new language
- oskenso 9y agoI like to write chip-8 and other VMs to get a handle Of a new lang
- jsjohnst 9y agoMine in similar, I implement an authoritative domain name server. I've done it in something like 20-25 languages now. The only language I've learned in the last decade I didn't write one in is ARM Assembly. I am not that "dedicated" (more like masochistic) enough to try to do one in assembly.
- frahs 9y agoexa is harder to type than ls, but this looks really cool.
- ams6110 9y agoYou could alias it to ls.
- yAnonymous 9y agoOr e.
- 0xTJ 9y agoThis is cool, I was having trouble with libraries, so I'm switching my main Linux to Arch.
- Girlang 9y agoWhat's "ls"? Is that like Get-Childitem?
- renox 9y agoI find quite funny that the author is so convinced that the use of colors is the "right default". 1) I'm colorblind so my view of colors is different from yours. 2) I find that any tool which use many colors suck: there will be a color combination which will be hard to read (for example git log: the sha1 keys are dark red on black, unreadable) but using just a few color is very nice (git diff: 3 colors, one for +, one for - and a third one for the rest, nice!). Also I've seen two times that the color bytes broke something: an expect script was broken by grep's colors and colleagues of mine were very confused when two similar commands gave different output, the reason? Colors! So colors by default? Thanks but no thanks.
- PaulHoule 9y agoMy trouble is that most terminals have color settings such that colored text is not very visible. I really wish I could have a large number of different-colored terminals for different tasks, and that is easy if I turn off color, as designing a whole color set that always works is a bigger job. What's funny is that colored interfaces worked just fine on IBM 3270 terminals in the 1980s, as they did on PCs. I can't understand why we can't get it to work right in the 2010s.
- scott_karana 9y ago256 colors is already the default in all modern Terminals, and 24-bit colour is configurable in most... If your machine uses termcap/terminfo, type this to see how many yours supports. tput colors
- vacri 9y agoAnother tricky thing is finding a colour set that works against various backgrounds. A ton of people use either black or white backgrounds. Occasionally you come across a different colour (eg: some people use red backgrounds for 'root' or 'production'), but even if you exclude these folks, getting something that works with both black and white backgrounds is a minimum requirement.
- jolmg 9y agoEvery new terminal I open uses a random background color. All colored text is always readable. What I did was make sure the background colors were always dark, and set the first 16 terminal colors to be light. I randomized the background color by specifing it to the terminal via a command line option as the output of this 10-line script[1] that takes an HSV Value as an argument and returns an RGB with randomized Hue. It's nice for terminals to be differently colored when you have many of them open. It helps one to realize when you've switched to the right one. [1] https://github.com/jolmg/randcolor https://github.com/jolmg/randcolor
- yosoyalejandro 9y agoVery cool project, will replace ls for exa :)
- deleted 9y ago[deleted]
- of 9y agoohh i thought exa was a replacement for the word 'is'. i was like damn.... that's fucking cool.
- SwellJoe 9y agoI love it, but it's also kinda angry fruit salad. Colors are good...too many colors is overwhelming. It might be that I'd come to recognize what the colors mean if I work with it every day, in the same way that I begin to recognize the flow of a program and when a color is "wrong" after using the same syntax highlighting in an editor for a long time. But, I couldn't tell you what any of the colors mean in my favorite editors. It's more about recognizing when something has the wrong color compared to everything else with that "shape". e.g. a good example is that in shell scripts, I often put space between the var name, '=', and the value. That's not an assignment and can lead to subtle bugs (shellcheck will catch it, too, but I see it clearly in the editor because it doesn't highlight as a variable declaration). So, what I'm getting at is that I'm pretty sure I'll always have to read the actual text to make any sense out of this output; the huge number of colors may just hinder readability. I don't know this for sure, but it's pretty jarring to look at even with a nice muted color scheme. I love colors in terminals, though, so I'll give it a go.
- kabdib 9y agoColor is one of the first things I turn off. So many tools color files in ways that are very difficult to read (dark blue against a black background, really?) I'm colorblind, too, so your red/orange/green distinctions are utterly wasted on me. Raw color is a very flaky and low fidelity way to communicate to a user. Animation, on the other hand: Give that super important file that's somehow busted or very active some kind of blink or a meaningful animation and you'll have my attention. I may hate the tool for it, but you'll have my attention...
- fnj 9y agoNo idea on earth why you are downvoted. My sympathies for your challenged vision. Your objection is well founded, and your suggestion has merit.
- zichy 9y agoPeople mistake accessibility for personal taste.
- yAnonymous 9y agoJudging the use of colors in software as a colorblind person is like rating shoes when you have no legs. He's coming across whiny and pretentious. Sorry it doesn't work for him, but colors are generally useful when working with lots of text.
- xaduha 9y agoNo one invented anything better than Commander-type UI for dealing with files. For non-trivial tasks I'd fire up vifm.
- nardi 9y agoMy first thought is that "exa" has all three letters in the left hand. Not nearly as easy to type as "ls".
- rhianna86 9y agoThis looks awesome. Anyone's gonna make a PR for ubuntu to add this?
- deleted 9y ago[deleted]
- untog 9y agoThis is cool, but it doesn't solve (in fact, exacerbates) my usual complaint with `ls` - I don't know what the arguments are. The example on the site is: exa -bghHliS Argh! I want to be able to say `ls --size` to get the file sizes. I don't want to remember a million arguments.
- SwellJoe 9y agoI just noticed the tests and the incredible lengths the author went to in order to effectively test exa. It's really impressive. GNU coreutils ls has a pretty good test suite, too ( http://git.savannah.gnu.org/cgit/coreutils.git/tree/tests/ls http://git.savannah.gnu.org/cgit/coreutils.git/tree/tests/ls ), but this goes well above and beyond the call for something so new.
- andrewflnr 9y agoThere's only one problem with this thing: all the characters are on one hand with a qwerty keyboard! A bit more annoying than ls, where you can practically hit the keys simultaneously. (You want to nitpick the colors, do you? I'll show you what real bikeshedding is...) In all seriousness, though, it looks good.
- mmarx 9y ago> There's only one problem with this thing: all the characters are on one hand with a qwerty keyboard! They are also all on the left hand in both Dvorak and Neo.
- LASR 9y agoComments are so fucking ridiculous that they make my blood boil. Colors are a way to present more information in the same amount of text. They are effective. Modern text editors color literally every single word, even displaying them different fonts and styles. Should we all just go backwards to using vi? You're color-blind? Nobody gives a fuck. Deal with it. 'Exa' hard to type? 3 characters! What savagery is this??? How could anyone possibly think you're capable of that? It must be so hard for you given that you've been suffering from congenital deadly ineptitude syndrome. And your left half of your body was entirely devoured by a bear when you tried to escape from the mental asylum. Everyone ought to accomodate you in every way possible. They owe you, since you are a true patriot and an exemplary human being doing the whole of humanity such a great service with your utmost and unrelenting dedication to laziness.
- gesman 9y ago$ exa -bghHliS ???? How about: $ exa . -- with the same outcome? :)
- dsego 9y agoLooks very nice, I've been using K, which has some other cute features (https://github.com/supercrabtree/k https://github.com/supercrabtree/k), but I'll definitely add this to my arsenal.
- h1d 9y agoIf you want colors, you can use grc to colorize command outputs not just ls, even MySQL terminal. Some old HN thread. https://news.ycombinator.com/item?id=3858954 https://news.ycombinator.com/item?id=3858954
- axaxs 9y agoi'm not going to be rude or hate exa, it looks really cool actually. I, for one, love the color coding. But trying to replace something as old and known as 'ls' probably isn't a realistic goal. I think talents would much better geared towards something missing, instead. Either way, keep up the good work.
- dan-compton 9y agoThe name is too long.
- pmarreck 9y agoReceive the feedback, but ignore the haters and do what you feel is right for your brainchild. I've learned some commandline tricks just from reading the comments!
- rv77ax 9y agoThe last thing I want in terminal is colours.
- tariandbari 9y agoTo the author: As you are already making a much more user and human friendly version of ls (like making ls -h the default behavior) please consider placing the name of the file on the left most column inode Permissions Links Size Blocks User Group Date Modified Name 21214836 .rw-r--r-- 1 9.4Ki 24 ben staff 29 Jun 16:16 Cargo.lock As a human I first care for the name, Currently I'm forced to scan the right most column (which position varies) and then travel back to the beginning of the line and read the rest of the metadata
- yAnonymous 9y agoIt's much easier to deal with line breaks. File names first would break the entire layout when one of them is too long. And when the terminal is on the left, you don't have to move your eyes so much away from the middle of the screen.
- nightcracker 9y agoFor a command that gets typed as often as 'ls', choosing 'exa', which is typed with one hand only, even worse, with a repeated finger, is kind of a poor choice.
- runeks 9y ago#!/bin/bash alias lse = exa
- TomK32 9y agoA multi-threaded program to list files. The times we are living in... I'll give it a try for a few weeks.
- roadbeats 9y agoI already installed & replaced my ls config. Thanks for making it!
- d--b 9y agoi 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...
- Cockbrand 9y agoI really dig the very useful output, but I'd also muchly appreciate an `ls` compatibility mode. Thus, one could put something like `alias ls='axa --compat'` into .profile and wouldn't have to re-train their muscle memory. F.e., I'm personally using `ls -altr` very often, and `axa -altr` will yield me an error.
- lwindy 9y agoI honestly just like it, colors make it easier on my eyes
- Dowwie 9y agoThis is great. I'm switching to exa! I had high hopes with this command but found the git features missing: exa -l --git --time-style=long-iso -T Nonetheless, this displays Hopefully, the author finds this worth the time to support..
- cytzol 9y agoYo. What's it display? Feel free to raise a bug if something doesn't look right. I know it's not the fastest-moving open-source project, but I'll still read everything that people submit.
- Dowwie 9y agothe output is missing the git modification flags issue: https://github.com/ogham/exa/issues/183 https://github.com/ogham/exa/issues/183
- tym0 9y agoI've been using k [1] to get pretty much the same functionalities but, being written in zsh, it's terribly slow. Your program looks nice but I would love to have an output closer to k in term of colour [2], at the moment it feels way to noisy to me. [1] https://github.com/supercrabtree/k https://github.com/supercrabtree/k [2] https://raw.githubusercontent.com/supercrabtree/k/gh-pages/file-size-colors.jpg https://raw.githubusercontent.com/supercrabtree/k/gh-pages/f...
- cytzol 9y agoI've seen k before, it's pretty neat. You can't grey out the columns in exa until I land configurable colours, which I hope to get done relatively soonish. But you can use the --colour-scale (or --color-scale) option to colour file sizes based on how big they are. The person who submitted the feature request (https://github.com/ogham/exa/issues/65 https://github.com/ogham/exa/issues/65) used k as a direct example.
- tym0 9y agoNice, looking forward to the configurable colours, I feel when everything is in bright colour it makes hierarchy much harder to read.
- torus 9y agoNice, I like the -T option.
- swah 9y agoVery interesting - thanks. /exa/src $ cloc . 41 text files. 41 unique files. 0 files ignored. http://cloc.sourceforge.net v 1.60 T=0.10 s (423.5 files/s, 64346.3 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Rust 41 1152 929 4149 ------------------------------------------------------------------------------- SUM: 41 1152 929 4149 -------------------------------------------------------------------------------
- baby 9y agoThis is amazing! Now: * can you use unicode icons to replace `d` and others with icons of folders and such? * where are the color signification explained?
- TedHerman 9y agoSurprised no one has suggested replacing permissions display with emoticons.
- Radio_Killer 9y agoThe git support seems like a mis feature. It's not very modular for your file viewer to randomly have support for one particular VCS. Might seem cool now but in a decade there'll be some other new hotness.
- callaars 9y agoI used it now for a year (maybe more, I can't remember) and I find it fantastic. It's great, and I can't imagine using plain old ls any more. No matter what people say, I love it.