Use exa
exa
is an alternative to ls
.
One of it’s features is show icons on the command line.
This does however require a font that supports this, like Nerd (see this issue).
On MacOS you can do the following:
$ brew tap homebrew/cask-fonts
$ brew install --cask font-hack-nerd-font
And the pick the font in your terminal application.
I am currently using the following aliases:
alias ls='exa --grid --color auto --icons --sort=type'
alias ll='exa --long --color always --icons --sort=type'
alias la='exa --grid --all --color auto --icons --sort=type'
alias lla='exa --long --all --color auto --icons --sort=type'