open up Terminal and run chsh -s /bin/zsh
If interested you could go ahead and make a few basic visual changes in Profiles tab.
official repo has pretty good documentaion. The punch line is find somewhere to clone it then tell your ~/.zshrc about it. /usr/local is probably a better spot in hindsight than /etc where I put put it.
- cd into your newly cloned oh-my-zsh into templates and you can do a
cp zshrc.zsh-template ~/; mv ~/zshrc.zsh-template ~/.zshrc
- next open up the ~/.zhshrc in your editor of choice and edit the line below "# Path to your oh-my-zsh installation" to the path of your clone.
export ZSH=/etc/oh-my-zsh
in my case. You'll also want to add the following to avoid an warning that wants you to muck around with permissions unnecessarily:
# skip the verification of [oh-my-zsh] insecure directories
ZSH_DISABLE_COMPFIX="true"
It's also worth noting that a lot of people are fans of using iTerm2 over Apple's Terminal. I'm kinda lazy and not gotten around to playing with it as something else to learn with everything else I'm doing.
- so I don't have to option my ls command all the time:
alias ls='ls -Ghp'
- since I've never learned vi I setmy default editor to nano:
export EDITOR=nano
- some additional highlighting zsh-syntax-highlighting clone into oh-my-zsh directory and add the following accounting for your path:
source /etc/oh-my-zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets cursor)
- if like me you can't stand their ls colors then you can insert the block below for standard terminal ansi colors which can be easily adjusted in the Terminal preferences:
# ls colors
autoload -U colors && colors
LS_COLORS="di=34:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
export LS_COLORS
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# Enable lscolors
export LSCOLORS="exfxcxdxbxegedabagacad"
- the last big thing for me was a rework of thier promp. comment out #
ZSH_THEME="robbyrussell"
and insert following:
# escapse \e[...m 35 forground 48 background 5 blink 1 bold to reset {\e[0m:%}
if [[ -n $SSH_CONNECTION ]]; then
#remotehost
PROMPT=$'%{\e[38;5;125m%}%m%{\e[0m:%}%{\e[38;5;172m%}%2~%{\e[0m%}%# \ '
else
#localhost
# PROMPT=$'%{\e[38;5;100m%}\u27A4 %{\e[0m:%}%{\e[38;5;172m%}%2~%{\e[0m%}%# \ '
PROMPT=$'%{\e[38;5;100m%}\u27A4 %{\e[38;5;172m%}%2~%{\e[0m%} $(git_prompt_info) %# \ '
fi
- followed by git promt modifications:
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"