This post is a collection of the shell aliases, completions, prompt tweaks, and environment configs I rely on day to day. It is a working set of shortcuts that keeps terminal work fast, consistent, and portable across desktop and server terminal environments. Treat each section as a drop-in snippet for ~/.bashrc or ~/.bash_profile.

Aliases & Completions
PYTHON
alias python="python3"
alias pip="pip3"
export PATH="$HOME/.local/bin:$PATH"
NAVIGATION
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias code="cd ~/code"
alias home="cd ~"
alias dt="cd ~/Desktop"
alias dl="cd ~/Downloads"
GIT
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
GITHUB
alias ga='git add -A'
alias gagc="git add -A && git commit -am "
alias gb='git branch -av'
alias gbd="git branch -D "
alias gbgone="git branch -vv | grep ': gone]' | awk '{print \$1}' | xargs git branch -D"
alias gc='git commit -am'
alias gcb="git checkout -b "
alias gf='git fetch -p'
alias gfgb="git fetch -p && git branch -av"
alias gpull="git pull"
alias gpush="git push"
alias gpuo="git push -u origin "
KUBECTL
export KUBECONFIG=~/.kube/config
alias k='kubectl'
alias kd='kubectl describe '
alias kg='kubectl get '
alias krm='kubectl delete '
alias kex='kubectl exec -it '
alias klo='kubectl logs -f '
alias kgoy='kubectl get -o yaml '
alias cro='cronjob'
alias dep='deployment'
alias sec='secret'
alias spc='secretproviderclass'
# Kubectl Expansion
[ -f ~/.kubectl_aliases ] && source ~/.kubectl_aliases
function kubectl() { echo "+ kubectl $@">&2; command kubectl $@; }
# KubectlCompletion
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
source <(kubectl completion bash)
LEANN
alias leann-activate='source ~/.leann-venv/bin/activate'
alias leann-chat='source ~/.leann-venv/bin/activate && leann ask notes-index \
--llm ollama \
--model qwen3-local \
--interactive \
--top-k 20'
alias leann-rebuild='source ~/.leann-venv/bin/activate && leann build notes-index \
--docs /Users/malcolmderungs/OneDrive/_notes \
--embedding-mode ollama \
--embedding-model nomic-embed-text-large \
--embedding-api-base http://127.0.0.1:11434 \
--chunk-size 512 \
--chunk-overlap 100 \
--file-types .md \
--force-rebuild'
Environment Confituration
TERMINAL PROMPT
# username
PS1="\[\e[0;93m\]\u\[\e[m\]"
# space
PS1+=" "
# current directory
PS1+="\[\e[0;95m\]\W\[\e[m\]"
# current branch
PS1+="\[\e[0;92m\]\$(git_branch)\[\e[m\]"
# space
PS1+=" "
# end prompt
PS1+=">> "
export PS1;
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
COPILOT-CLI WRAPPERS
??() {
copilot -i "$*"
}
git?() {
copilot -i "git $*"
}
gh?() {
copilot -i "gh $*"
}
# Export the custom functions so subshells recognize them
export -f ?? git? gh?
GIT FUNCTIONS
git_branch() {
git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
DOCKER - DEFAULT BUILD
export DOCKER_DEFAULT_PLATFORM=linux/x86_64
[[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ]] && . "/opt/homebrew/etc/profile.d/bash_completion.sh"
HOMEBREW
eval "$(/opt/homebrew/bin/brew shellenv)"
NVM
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"
PYCHARM
export PATH="/Applications/PyCharm.app/Contents/MacOS:$PATH"
PYTHON
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
RUST
. "$HOME/.cargo/env"
