Skip to content

Bash

Vi Mode

Enable vi keybindings in bash by adding the following to your ~/.bashrc:

shell
set -o vi

For a visual indicator of which mode you're in (insert vs command), create ~/.inputrc:

shell
set show-mode-in-prompt on
set vi-ins-mode-string "+"
set vi-cmd-mode-string ":"

Aliases

Add to ~/.bashrc:

shell
# Git
alias g="git"
alias gs="git status"
alias gl="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gsm="git submodule"
alias gsmr="git submodule update --init --recursive --remote --merge"

# Docker / Podman
alias d="docker"
alias dc="docker compose"
alias docker-compose="docker compose"
alias p="podman"
alias pc="podman-compose"
alias podman="docker"

# WordPress CLI
alias wp="docker compose --profile manual run --rm wpcli"