oh-my-zshの導入メモ


今使っているmacを買ったときにいろいろとツールのインストールやらなんやら環境設定をしたけど、なんとなくシェルがbashのままだった。
新年ということで今年からめんどくさがらずにちゃんとzshを使おうと思い立ち、とりあえず導入したのでメモを残す

インストール

wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

設定

デフォルトでインストール時のPATHを.zshrcにも設定してくれたみたいだけど、rvmのパスとかvirtualenvのパスとか、インストール時に有効だった環境のパスを含んでしまっているので削除。

で.bashrcの設定を.zshrcに転記

 cat ~/.bashrc >> ~/.zshrc


history関連の設定をしようと思ったんだけど、oh-my-zshが勝手に以下の設定してくれているみたい

~/.oh-my-zsh/lib/history.zsh

## Command history configuration
HISTFILE=$HOME/.zsh_history
HISTSIZE=10000
SAVEHIST=10000

setopt append_history
setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_dups # ignore duplication command history list
setopt hist_ignore_space
setopt hist_verify
setopt inc_append_history
setopt share_history # share command history data

historyはfc -l 1のaliasになった

pluginはとりあえず自分が今つかいそうなやつだけ設定

plugins=(git mercurial rvm python)

あとは仕事でしばらく使ってみてどうか、だなー