Skip to main content

Overview

Both Zsh and Bash configurations include numerous aliases to streamline common tasks. This page documents all aliases organized by category.

Editor aliases

Quick access to Neovim with different command variations:
alias vim="nvim"
alias vi="nvim"
alias v="nvim"
Usage:
vim config.toml

Directory listing

Enhanced ls commands using eza (Zsh) or standard ls (Bash):
~/.zshrc
alias ls="eza --color=auto"
alias ll="ls -l"
alias la="ls -a"
  • ls - Colorized listing with eza
  • ll - Long format
  • la - Show hidden files

Directory navigation

~/.zshrc
alias ..="cd .."
Quickly move up one directory level.

Zoxide aliases (Bash)

Bash-specific zoxide convenience aliases:
~/.bashrc
alias cda='zoxide add'      # Add directory to zoxide
alias cdq='zoxide query'    # Query zoxide database
alias cdqi='zoxide query -i' # Interactive query
alias cdr='zoxide remove'    # Remove directory

Terminal aliases

Quick terminal operations:
~/.zshrc
alias c="clear"  # Clear screen
alias q="exit"   # Exit shell
Type c instead of clear and q instead of exit for faster terminal management.

Git aliases

Lazygit

~/.zshrc
alias lg="lazygit"
Launch the lazygit TUI for intuitive git operations.

Grep aliases (Bash)

Colorized grep output:
~/.bashrc
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'

Utility aliases

Weather

~/.zshrc
alias weather="curl wttr.in"
Get current weather information from the command line:
$ weather
# Displays weather for your location

$ weather London
# Displays weather for London

.NET testing

Formatted .NET test output with colored results:
~/.zshrc
alias dotnet-test-pretty='dotnet test --no-restore --verbosity=normal | awk '\'''
'/Failed /{print "\n\033[31mFailed: " $2 "\033[0m"}'
'/Error Message:/{print "\033[33mError: " substr($0, index($0, ":")+1) "\033[0m"; st=0}'
'/Stack Trace:/{st=1; next}'
'st==1 && /at /{print "\033[36mStack: " $0 "\033[0m"; st=0}'
'\'''
Usage:
dotnet-test-pretty
Provides colored output highlighting:
  • Failed tests in red
  • Error messages in yellow
  • Stack traces in cyan

Ranger file manager

Conditional alias that only loads if Ranger is installed:
~/.zshrc
if command -v ranger &> /dev/null; then
  alias ra="ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR
fi
Launches Ranger and automatically changes to the directory you navigate to when exiting.

Alert alias (Bash)

Send desktop notifications when commands complete:
~/.bashrc
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
Usage:
# Get notified when a long build completes
npm run build; alert

# Notification for system updates
sudo apt update && sudo apt upgrade; alert
The notification icon changes based on whether the command succeeded or failed.

Category reference

  • vim → nvim
  • vi → nvim
  • v → nvim
  • c → clear
  • q → exit
  • lg → lazygit
  • weather → curl wttr.in
  • dotnet-test-pretty → formatted test output
  • ra → ranger with directory tracking
  • .. → cd ..
  • cda → zoxide add
  • cdq → zoxide query
  • cdqi → zoxide query -i
  • cdr → zoxide remove
  • grep → grep —color=auto
  • fgrep → fgrep —color=auto
  • egrep → egrep —color=auto

Creating custom aliases

Add your own aliases to the shell configuration files:
1

Open your shell config

# For Zsh
nvim ~/.zshrc

# For Bash
nvim ~/.bashrc
2

Add your alias

# Example: Create a shortcut for git status
alias gs="git status"

# Example: Quick access to a frequent directory
alias proj="cd ~/workspace/projects"
3

Reload your shell

# Reload the configuration
source ~/.zshrc  # for Zsh
source ~/.bashrc # for Bash
For temporary aliases that you don’t want to keep, simply type the alias command in your shell without adding it to the config file.

Build docs developers (and LLMs) love