Links

Terminal Customization

How to improve default terminal experience

ZSH

Completion Features

# add to ~/.zshrc
# enables completion features
autoload -Uz compinit && compinit
# automatically capitalizes where needed e.g., `cd documents/` >> `cd Documents/`
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'

Auto-Suggestions

# add to ~/.zshrc
# enables command auto-suggestions
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
hit left arrow key to use suggestion

AWS CLI

# add to ~/.zshrc
# enables command completion for aws cli (tab to complete)
# make sure path to aws_completer is correct
autoload bashcompinit && bashcompinit
autoload -Uz compinit && compinit
complete -C '/usr/local/bin/aws_completer' aws

Display Current Git Branch

# add to ~/.zsh
# updates shell colors, format, and displays git branch
parse_git_branch() {
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
# color #s found here: https://misc.flogisoft.com/bash/tip_colors_and_formatting
COLOR_DEF='%f'
COLOR_USR='%F{243}'
COLOR_DIR='%F{197}'
COLOR_GIT='%F{39}'
NEWLINE=$'\n'
setopt PROMPT_SUBST
export PROMPT='${COLOR_USR}%n@%M ${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% '
new colors and git branch in name