Prerequisites
Get applications:
- VSCode
- Rectangle
- AltTab
- Arc
- Homebrew
# install dev tools
sudo xcode-select --install
# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
eval "$(/opt/homebrew/binbrew/shellenv)"
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# install p10k
brew install powerlevel10k
source ~/.zshrc
# install autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# install cli utilities
brew install exa glow bat
-
Add the plugin to the list of plugins for Oh My Zsh to load (insideĀ
~/.zshrc
):plugins=( # other plugins... zsh-autosuggestions )
Aliases
prettify
alias vi='vim'
alias ls='exa
'
alias cat='bat'
function chpwd() {
ls
}
git
alias ga='git add . && git status'
alias gc='git commit -m'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gp='git push'
alias gb='git branch'
alias gs='git status'
alias gpsup='git push --set-upstream origin $(git_current_branch)'
alias gst='git stash'
alias gstp='git stash pop'
alias gmm='git checkout $(git_main_branch) && git pull && git switch - && git merge $(git_main_branch)'
alias gsw='git switch -'
sysadmin
alias dc='docker-compose'
alias dcr='docker-compose up -d --force-recreate'
alias dcl='docker-compose logs'
alias dk='docker'
alias k='kubectl'