exa’s most prominent feature is its colour scheme. It’s designed for modern, 256-colour terminals, and it’s not shy about it!
If you are using the details view with
--long, the values in those columns will be coloured too.
Known file types
exa knows about a lot of file extensions, and will highlight them for you without any configuration. It knows that
.jpg files are images,
.zip files are compressed, and that files ending in
~ are backups.
It’s like having a huge
Here’s the full list:
And here’s what it looks like:
exa /testcases/file-names-exts #SAVEFILE# compressed.deb crypto.asc image.svg VIDEO.AVI backup~ compressed.tar.gz crypto.signature lossless.flac video.wmv compiled.class compressed.tar.xz document.pdf lossless.wav compiled.coffee compressed.tgz DOCUMENT.XLSX Makefile compiled.js compressed.txz file.tmp music.mp3 compiled.o COMPRESSED.ZIP IMAGE.PNG MUSIC.OGG
Compiled file types
When listing a directory, exa will examine files with the same name and will ‘dim’ the ones that look like they’ve been compiled by the others.
Files with the extensions
.pyc will always be treated as compiled — these extensions are commonly used as compiler output for various languages.
If your directory has two files,
If there is only a
scripts.jsfile present, and no
scripts.coffee, then the file will not be highlighted — without a matching file, there’s no way to tell it’s a compilation target.
exa dist/ compiled.class compiled.css compiled.o compiled.coffee compiled.js
--classify option puts a type indicator character at the end of special files’ names.
The character marks executable files, directories, pipes, links, and sockets.
exa directory executable file fifo symlink socket exa --classify directory/ executable* file fifo| symlink@ socket=
What’s an “immediate” file?
If you’re browsing a directory full of source code, it’s useful to see the documentation or build script that “kicks off” the entire project. This is why exa calls them immediate files — they’re meant to be the first file you read or run.
The list of immediate files highlights all
README files, as well as the filenames for several common build systems.
A common extension is missing. Can it be added?
Sure! Feel free to create an issue or submit a Pull Request on GitHub. Quite a few of exa’s extensions were added this way.
Can I turn the colours on and off?
--colours command-line option can be set to
never to force colours to be always on or always off.
The default behaviour is
--colours=automatic, which varies depending on whether exa is being run from a terminal.
What happens when output is not to a terminal?
By default, exa assumes that if you’re running it from a terminal, you want to see the colours, and if you’re not, then you don’t want any ANSI escape codes cluttering up your output.
To turn colours off in your terminal, or to turn them on outside, it, you can use the
--colours option detailed above.