The command-line tools I use in place of ls and cat, plus fuzzy history search and a fixer for mistyped commands.

Tools Overview

eza

A replacement for ls, written in Rust, with better defaults.

  • Key Features: Icons, colors by file type, git integration, and tree view.
  • Aliased as: ls, ll, la, lla, lt.

bat

A cat clone with syntax highlighting and Git integration.

  • Key Features: Syntax highlighting for most languages, line numbers, and automatic paging for long files.
  • Aliased as: cat.

fzf

A general-purpose command-line fuzzy finder.

  • Key Features: Filters command history, files or any list as you type.
  • Shortcuts: Ctrl + R for history search, Ctrl + T for file search.

thefuck

Corrects your previous console command.

  • Key Features: Corrects typos, missing sudo, and other common CLI mistakes.
  • Usage: Type fuck after a failed command.

Configuration in .zshrc

The aliases and hooks in my .zshrc:

# eza in place of ls; ll/la/lla expand through the ls alias, so the flags live in one place
alias ls='eza --icons --group-directories-first'
alias ll='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias lt='eza --tree --icons'
 
alias cat='bat'
 
eval "$(thefuck --alias)"
 
# fzf 0.48+ generates its own zsh key bindings and completion
source <(fzf --zsh)

Shortcuts Summary

ToolShortcut / AliasAction
ezaltShow the current directory as a tree
fzfCtrl + RFuzzy-search your command history
fzfCtrl + TFind any file and paste its path
thefuckfuckFix the last misspelled command
batcat <file>View a file with syntax highlighting

(y) Return to Notes | (y) Return to CLI & Tools | (y) Return to Home