Skip to content

Instantly share code, notes, and snippets.

@raydive
Created July 7, 2014 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raydive/24f591d365b444820861 to your computer and use it in GitHub Desktop.
Save raydive/24f591d365b444820861 to your computer and use it in GitHub Desktop.
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000000
SAVEHIST=1000000
setopt appendhistory autocd extendedglob notify auto_pushd correct magic_equal_subst prompt_subst
unsetopt beep
bindkey -e
# completion
zstyle :compinstall filename './zshrc'
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
typeset -U fpath
fpath=(
/usr/local/share/zsh-completions(N-/)
/usr/local/share/zsh/site-functions(N-/)
$HOME/.dotfiles/zsh.d/functions(N-/)
$fpath
)
# tmuxinator
if [ -f $HOME/.tmuxinator/tmuxinator.zsh ]; then
source $HOME/.tmuxinator/tmuxinator.zsh
fi
autoload -Uz compinit
compinit -u
setopt auto_list auto_menu list_packed list_types
bindkey "^[[Z" reverse-menu-complete # Shift-Tabで補完候補を逆順する
# prompt
autoload -U colors
colors
# git, hgのブランチ表示
if [ -s $HOME/.dotfiles/zsh.d/vcs_prompt.sh ]; then
source $HOME/.dotfiles/zsh.d/vcs_prompt.sh
fi
PROMPT='[%F{magenta}%B%n%b%f@%F{cyan}%U%m%u%f][%F{green}%~%f]
$ '
# *env系の定義
if which rbenv > /dev/null; then eval "$(rbenv init - zsh)"; fi
if which pyenv > /dev/null; then eval "$(pyenv init - zsh)"; fi
if which plenv > /dev/null; then eval "$(plenv init - zsh)"; fi
# alias
alias ls='ls -GF'
alias la='ls -a'
alias ll='ls -la'
alias diff='colordiff'
alias less='less -R'
alias tz='tar xvzf'
alias tj='tar xvjf'
# 各環境別ファイルを読み込む
case ${OSTYPE} in
darwin*)
[ -s ./zshrc_mac ] && source ./zshrc_mac
;;
linux*)
[ -s ./zshrc_linux ] && source ./zshrc_linux
;;
esac
# 環境設定などいろいろ
# env
export TERM=xterm-256color
export HGENCODING=UTF-8
export LANG=ja_JP.UTF-8
export CLICOLOR=1
export LSCOLORS=xefxcxdxbxegedabagacad
export LS_COLORS='di=01;34:ln=01;35:so=01;32:ex=01;31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;'
# 使うエディタとページャ
export PAGER="lv -c"
export GIT_PAGER="lv -c"
# PATH
typeset -T PKG_CONFIG_PATH pkg_config_path
typeset -u path pkg_config_path
path=(
/usr/local/bin(N-/)
/usr/local/sbin(N-/)
/usr/local/heroku/bin(N-/)
/usr/local/share/npm/bin(N-/)
$HOME/.rbenv/shims(N-/)
$HOME/.pyenv/shims(N-/)
$HOME/.plenv/shims(N-/)
$HOME/bin(N-/)
$path
)
pkg_config_path=(
/usr/local/lib/pkgconfig(N-/)
$pkg_config_path
)
export NODE_PATH=/usr/local/lib/node
# 各環境固有の設定
case ${OSTYPE} in
darwin*)
[ -s ./zshenv_mac ] && source ./zshenv_mac
;;
linux*)
[ -s ./zshenv_linux ] && source ./zshenv_linux
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment