Zsh Basics

Zsh shell essentials and Oh My Zsh.

Zsh Features

Command completion
Tab twice for suggestions

Directory stack
cd folder
cd - // go back
dirs -v // show stack

Glob patterns
ls **/*.txt // recursive
ls *.{jpg,png} // multiple extensions

Oh My Zsh

Install Oh My Zsh
sh -c $(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)

Change theme
Edit ~/.zshrc
ZSH_THEME=robbyrussell

Apply changes
source ~/.zshrc

Plugins

Enable plugins (~/.zshrc)
plugins=(git node npm docker)

Popular plugins
git // git aliases
zsh-autosuggestions // command suggestions
zsh-syntax-highlighting // syntax colors
z // jump to frequent dirs

Aliases & Functions

Create alias (~/.zshrc)
alias ll=ls -lah
alias gs=git status

Create function
mkcd() {
  mkdir -p $1
  cd $1
}

Usage
mkcd my-new-folder