Oh my zsh on MacOS

  1. Use brew install zsh zsh-completions install zsh 1
  2. Install oh-my-zsh by using sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 2
  3. Edit file ~/.zshrc
  4. Change your default shell chsh -s /bin/zsh
  5. Setup font 3, Set this font in iTerm2 (14px is my personal preference) (iTerm → Preferences → Profiles → Text → Change Font).

After brew install zsh zsh-completions, can see.


To activate these completions, add the following to your .zshrc:

  autoload -Uz compinit
  compinit

You may also need to force rebuild `zcompdump`:

  rm -f ~/.zcompdump; compinit

Additionally, if you receive "zsh compinit: insecure directories" warnings when attempting
to load these completions, you may need to run this:

  chmod -R go-w '/usr/local/share/zsh'

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions

Edit file ~/.zshrc

Update theme

ZSH_THEME="agnoster"

Update plugins

plugins=(
  git
  dotenv
  osx
  docker
  docker-compose
  iterm2
  laravel5
  sublime
  composer
)

Plugins

git 4

web-search 5

sublime 6

osx 7

Command Description
tab Open the current directory in a new tab
split_tab Split the current terminal tab horizontally
vsplit_tab Split the current terminal tab vertically
ofd Open the current directory in a Finder window
pfd Return the path of the frontmost Finder window
pfs Return the current Finder selection
cdf cd to the current Finder directory
pushdf pushd to the current Finder directory
quick-look Quick-Look a specified file
man-preview Open a specified man page in Preview app
showfiles Show hidden files
hidefiles Hide the hidden files
itunes Control iTunes. Use itunes -h for usage details
spotify Control Spotify and search by artist, album, track…
rmdsstore Remove .DS_Store files recursively in a directory