eza Setup: Icons and Colors for Terminal Listings
eza is a fast, Rust-based directory lister for the terminal: icons, colors, tree view, and optional git column without Ruby gems.
Install
Section titled “Install”brew install ezaAliases for ~/.zshrc
Section titled “Aliases for ~/.zshrc”nano ~/.zshrcAppend:
# eza — ls replacement (icons, trees)alias ls='eza --icons --group-directories-first'alias ll='eza -lhA --icons --group-directories-first'alias lt='eza --tree --icons --level=2'alias lta='eza --tree --icons --long -h --level=3'Reload:
source ~/.zshrc| Command | Description |
|---|---|
ls | Colorized list with icons (via alias) |
ll | Long listing, hidden files, human-readable sizes |
lt | Tree view, depth 2 |
lta | Tree with sizes, depth 3 |
eza --level=4 | Tree with custom depth |
lt /Volumes/YourDrive | Tree of a mounted volume (substitute your path) |
Common Flags
Section titled “Common Flags”Interpret these tokens as eza options:
--icons # icons-l, --long # permissions, owner, size, time-a, --all # include hidden entries-h # human-readable sizes (prefer -h; --human-readable is rejected on some eza builds)--tree # nested layout--level=N # cap tree depth--group-directories-first # folders before files--git # short git hints per row--sort=name|modified|size|ext # common sort fieldsExample One-Liners
Section titled “Example One-Liners”eza --tree --long -h --level=2 /Volumes/YourDrive
eza -lh --sort=size
eza -lah --git ~/projects/myrepo
eza -DWhy eza Instead of colorls
Section titled “Why eza Instead of colorls”Ruby-based colorls is easy to break on newer macOS; it depends on gems and interpreter versions your shell may not guarantee.
| Topic | colorls | eza |
|---|---|---|
| Language | Ruby gem | Rust binary |
| Speed | Slow | Fast |
| Maintenance | Mostly abandoned | Actively maintained |
| Dependencies | Ruby, gems | Single binary via Homebrew |
| Apple Silicon / recent macOS | Often problematic | Widely used |
Together with lsd and plain ls, eza is a pragmatic default when you want icons, trees, and consistent performance without a Ruby stack.