#308 Oh My ZSH
Dec 19, 2011 | 9 minutes | Tools
As Rails developers, we frequently use the command line. Here I will show how to switch to Z Shell using Oh My ZSH including how to make your own theme and plugins.
- Download:
- source codeProject Files in Zip (2.18 KB)
- mp4Full Size H.264 Video (25.9 MB)
- m4vSmaller H.264 Video (11.2 MB)
- webmFull Size VP8 Video (11.7 MB)
- ogvFull Size Theora Video (23.5 MB)
Resources
Correction: Maintaining the current directory when opening a new tab is a new feature in OS X Lion Terminal, not Oh My ZSH. That's what I get for switching to both at the same time.
bash
ps
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
mate ~/.zshrc
cat ~/.bash_profile >> ~/.zshrc
mate ~/.oh-my-zsh
ps wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh mate ~/.zshrc cat ~/.bash_profile >> ~/.zshrc mate ~/.oh-my-zsh
.zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="rbates"
# Uncomment following line if you want to disable colors in ls
DISABLE_LS_COLORS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git bundler brew gem rbates)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Path to your oh-my-zsh configuration. ZSH=$HOME/.oh-my-zsh # Set name of the theme to load. # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. ZSH_THEME="rbates" # Uncomment following line if you want to disable colors in ls DISABLE_LS_COLORS="true" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Example format: plugins=(rails git textmate ruby lighthouse) plugins=(git bundler brew gem rbates) source $ZSH/oh-my-zsh.sh # Customize to your needs... export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)"
.oh-my-zsh/themes/rbates.zsh-theme
PROMPT='%3~$(git_prompt_info)%# '
ZSH_THEME_GIT_PROMPT_PREFIX="["
ZSH_THEME_GIT_PROMPT_SUFFIX="]"
PROMPT='%3~$(git_prompt_info)%# ' ZSH_THEME_GIT_PROMPT_PREFIX="[" ZSH_THEME_GIT_PROMPT_SUFFIX="]"
.oh-my-zsh/custom/plugins/rbates/rbates.plugin.zsh
c() { cd ~/code/$1; }
_c() { _files -W ~/code -/; }
compdef _c c
c() { cd ~/code/$1; }
_c() { _files -W ~/code -/; }
compdef _c c
