Chánh Đại's avatar
Chánh Đại 

Awesome Terminal (iTerm2 + Zsh + Oh My Zsh + Amazon Q)

Optimize your terminal with iTerm2, Zsh, Oh My Zsh, and Amazon Q - a guide to installation, theme customization, plugins, and configuration for an enhanced command-line experience.

Install iTerm2

Download

https://iterm2.com/downloads.html

Custom Theme

https://draculatheme.com/iterm

Install Oh My Zsh

Reference: https://ohmyz.sh/#install

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install Oh My Zsh Theme

Reference: https://github.com/ncdai/ncdai.zsh-theme

git clone git@github.com:ncdai/ncdai.zsh-theme.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/ncdai.zsh-theme

Activate the theme

~/.zshrc
ZSH_THEME="ncdai.zsh-theme/ncdai"

Install Oh My Zsh Plugins

zsh-z

Reference: https://github.com/agkozak/zsh-z#installation

git clone https://github.com/agkozak/zsh-z $ZSH_CUSTOM/plugins/zsh-z

zsh-syntax-highlighting

Reference: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

zsh-autosuggestions

Reference: https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Activate plugins

~/.zshrc
plugins=(git zsh-z zsh-syntax-highlighting zsh-autosuggestions)

User Configuration

~/.zshrc
# Language environment
export LANG=en_US.UTF-8
 
# Alias
alias workspace-on-mac="cd ~/Workspace"
 
# Homebrew
export HOMEBREW_EDITOR="/usr/bin/nano"
 
# Yarn
export PATH="$(yarn global bin):$PATH"

Install Amazon Q for command line

Reference: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html