Home

Awesome

zsh-aliases-exa

Purpose

This zsh plugin enables a number of aliases extending exa, the modern replacement for ls.

Use

To use it, you should first install exa. You can do so easily using Homebrew on the Mac:

brew install exa

Next, download this repo into your custom plugins directory. For my installation using Oh My Zsh, I cloned the repo to ~/.oh-my-zsh/custom/plugins.

Lastly, add zsh-aliases-exa to the plugins array of your zshrc file:

plugins=(... zsh-aliases-exa)

Restart your zsh session, and the aliases will be available.

Aliases

# general use
alias ls='exa'                                                          # ls
alias l='exa -lbF --git'                                                # list, size, type, git
alias ll='exa -lbGF --git'                                             # long list
alias llm='exa -lbGd --git --sort=modified'                            # long list, modified date sort
alias la='exa -lbhHigUmuSa --time-style=long-iso --git --color-scale'  # all list
alias lx='exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale' # all + extended list

# specialty views
alias lS='exa -1'                                                              # one column, just names
alias lt='exa --tree --level=2'                                         # tree

Note: the -d option removes the display of files, filtering it to only show directories. I cannot identify a time when I want that, so I have not included it.

Next Steps

Thanks

Big thanks to Oh My Zsh, Homebrew, and Exa for these terrific tools. They have made the command line fun again.

Contributors