Skip to content

Aliases Reference

A comprehensive list of shell aliases and functions.

AliasCommandDescription
..cd ..Go up one directory
...cd ../..Go up two directories
....cd ../../..Go up three directories
~cd ~Go to home
-cd -Go to previous directory

File Operations

Listing (eza)

AliasCommandDescription
lseza --icons --group-directories-firstList files
lleza -la --icons --group-directories-firstLong list
laeza -a --iconsList all
lteza --tree --level=2 --iconsTree view
l.eza -d .*List hidden files

Viewing (bat)

AliasCommandDescription
catbat --style=autoView file with syntax highlighting
lessbat --style=auto --paging=alwaysPage through file

Finding

AliasCommandDescription
findfdFind files (fd)
greprgSearch content (ripgrep)

Git

Basic Commands

AliasCommandDescription
ggitGit shorthand
gsgit statusStatus
gagit addStage files
gaagit add --allStage all
gcgit commitCommit
gcmgit commit -mCommit with message
gcagit commit --amendAmend last commit

Branches

AliasCommandDescription
gbgit branchList branches
gbagit branch -aAll branches
gbdgit branch -dDelete branch
gcogit checkoutCheckout
gcbgit checkout -bNew branch
gmgit mergeMerge

Remote

AliasCommandDescription
gpgit pushPush
gpfgit push --force-with-leaseForce push (safe)
glgit pullPull
gfgit fetchFetch
grgit remote -vList remotes

History & Diff

AliasCommandDescription
gdgit diffDiff
gdsgit diff --stagedDiff staged
gloggit log --oneline --graph --decoratePretty log
glastgit log -1 HEAD --statLast commit

Tools

AliasCommandDescription
lglazygitOpen lazygit

Editors

AliasCommandDescription
nnvimNeovim
vnvimNeovim
vimnvimNeovim

Python

AliasCommandDescription
pypythonPython
py3python3Python 3
pipuv pipUV pip
venvsource .venv/bin/activateActivate venv
mkvenvuv venvCreate venv

Docker

AliasCommandDescription
ddockerDocker
dcdocker composeDocker Compose
dpsdocker psList containers
dimgdocker imagesList images
lzdlazydockerLazydocker

System

AliasCommandDescription
cclearClear terminal
hhistoryCommand history
pathecho $PATH | tr ':' '\n'Show PATH
portslsof -i -P -n | grep LISTENShow listening ports
ipcurl -s ifconfig.mePublic IP
localipipconfig getifaddr en0Local IP

Homebrew

AliasCommandDescription
brbrewHomebrew
bribrew installInstall
brubrew update && brew upgradeUpdate all
brcbrew cleanupCleanup
brsbrew searchSearch

Utilities

AliasCommandDescription
weathercurl wttr.inWeather
mooncurl wttr.in/moonMoon phase
cheatcurl cheat.sh/Cheat sheets
myipcurl ifconfig.mePublic IP

Functions

mkcd - Create and enter directory

bash
mkcd mydir
# Creates mydir and cd into it

extract - Universal extractor

bash
extract archive.tar.gz
extract file.zip
extract package.7z

fkill - Fuzzy process killer

bash
fkill
# Shows process list, select to kill

take - Create nested directories

bash
take path/to/nested/dir
# Creates all directories and enters the last one

backup - Create timestamped backup

bash
backup myfile.txt
# Creates myfile.txt.2024-01-15_10-30-00.bak

serve - Quick HTTP server

bash
serve
# Starts server at http://localhost:8000

serve 3000
# Starts server at http://localhost:3000

Exploring Aliases

Use the built-in aliases command:

bash
# Interactive TUI mode
aliases

# List all aliases as table
aliases --list

# Search for specific aliases
aliases --search git

# Export as JSON
aliases --json

Adding Custom Aliases

Edit ~/.aliases or ~/dotfiles/zsh/.aliases:

bash
# Add your alias
alias myalias="my command"

# Add a function
myfunction() {
    echo "Hello, $1!"
}

Then reload:

bash
source ~/.aliases
# or
exec zsh

Released under the MIT License.