Created
September 9, 2011 06:23
-
-
Save itochan/1205606 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lines configured by zsh-newuser-install | |
HISTFILE=~/.zsh_history | |
HISTSIZE=100000 | |
SAVEHIST=100000 | |
# End of lines configured by zsh-newuser-install | |
export LANG=ja_JP.UTF-8 | |
export GIT_SSL_NO_VERIFY=true | |
export TERM=xterm-256color | |
autoload -Uz colors | |
colors | |
autoload -Uz compinit | |
compinit | |
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' formats '(%s)-[%b]' | |
zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a]' | |
precmd () { | |
psvar=() | |
LANG=en_US.UTF-8 vcs_info | |
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_" | |
} | |
#PROMPT settings | |
RPROMPT="%1(v|%F{green}%1v%f|)" | |
PROMPT="[%n@%m]%~%# " | |
# auto change directory | |
setopt auto_cd | |
# auto directory pushd that you can get dirs list by cd -[tab] | |
setopt auto_pushd | |
# share history | |
setopt share_history | |
# command correct edition before each completion attempt | |
setopt correct | |
setopt correct_all | |
# compacked complete list display | |
setopt list_packed | |
# no remove postfix slash of command line | |
#setopt noautoremoveslash | |
# no beep sound when complete list displayed | |
setopt nolistbeep | |
# TABで順に保管候補を切り替える | |
setopt auto_menu | |
# 保管候補一覧でファイルの種別をマーク | |
setopt list_types | |
# = 以降でも補完できるようにする | |
setopt magic_equal_subst | |
# 補完時の日本語を正しく表示する | |
setopt print_eight_bit | |
# 重複するコマンド行は古い方を削除する | |
#setopt hist_ignore_all_dups | |
# 履歴を追加 | |
setopt append_history | |
# 履歴をインクリメンタルに追加 | |
setopt inc_append_history | |
# 補完時に文字列末尾へカーソル移動 | |
setopt always_to_end | |
# あいまい補完時に候補表示 | |
setopt auto_list | |
# エイリアスを補完対象に | |
setopt complete_aliases | |
# historyコマンドをヒストリリストから取り除く | |
setopt hist_no_store | |
# 先頭が空白だった場合はログに記述しない | |
setopt hist_ignore_space | |
# ビープ音を出さない | |
setopt no_beep | |
# ヒストリを呼び出してから編集可能な状態にする | |
setopt hist_verify | |
# pushdで同じディレクトリを重複してpushしない | |
setopt pushd_ignore_dups | |
# 補完候補のカーソル選択を有効にする | |
zstyle ':completion:*:default' menu select=1 | |
# 補完の時に大文字小文字を区別しない(但し、大文字を打った場合は小文字に変換しない) | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
case "${OSTYPE}" in | |
freebsd*|darwin*) | |
export LSCOLORS=ExFxCxdxBxegedabagacad | |
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;30' | |
;; | |
*) | |
eval `dircolors` | |
;; | |
esac | |
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} | |
export ZLS_COLORS=$LS_COLORS | |
#if [ ! -f ~/.zshrc_env ]; then | |
# eval `dircolors` | |
# export ZLS_COLORS=$LS_COLORS | |
# zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} | |
#fi | |
#zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
#zstyle ':completion:*:default' menu select | |
#bindkey settings | |
#bindkey -v | |
bindkey "^R" history-incremental-search-backward | |
bindkey "^S" history-incremental-search-forward | |
bindkey "^?" backward-delete-char | |
bindkey "^H" backward-delete-char | |
bindkey "^[[3~" delete-char | |
bindkey "^[[1~" beginning-of-line | |
bindkey "^[[4~" end-of-line | |
# alias settings | |
case "${OSTYPE}" in | |
freebsd*|darwin*) | |
alias ls="ls -G -w" | |
;; | |
linux*) | |
alias ls="ls --color=tty" | |
;; | |
esac | |
alias l.="ls -d .*" | |
alias ll="ls -l" | |
alias cp="cp -i" | |
alias mv="mv -i" | |
alias rm="rm -i" | |
alias vi="vim" | |
alias wget="wget --no-check-certificate" | |
alias which="which -a" | |
alias sudo='A=`alias` sudo' | |
alias grep="grep --color=auto" | |
alias git-submodule-update="git submodule foreach 'git pull origin master' && git submodule update" | |
alias gist="gist -o" | |
alias df="df -h" | |
alias du="du -h" | |
if [ -f /Applications/MacVim.app/Contents/MacOS/Vim ]; then | |
alias vim='/Applications/MacVim.app/Contents/MacOS/Vim -g --remote-tab 2>/dev/null >/dev/null' | |
# export EDITOR=/Applications/MacVim.app/Contents/MacOS/Vim | |
export EDITOR=vim | |
fi | |
# shit emacs!!!!!!!!! | |
alias emacs="echo shit" | |
alias emacs_is_very_ugly_editor="`which emacs`" | |
alias emacs_is_very_ugly_editor_寿限無寿限無五劫の擦り切れ海砂利水魚の水行末雲来末風来末食う寝る処に住む処やぶら小路の藪柑子パイポパイポパイポのシューリンガンシューリンガンのグーリンダイグーリンダイのポンポコピーのポンポコナーの長久命の長助='emacs' | |
alias emacshit='vim' | |
if [[ -f ~/.screenrc_env ]]; then | |
alias screen="screen -c ~/.screenrc_env" | |
fi | |
if [ -f /etc/zsh_command_not_found ]; then | |
. /etc/zsh_command_not_found | |
fi | |
case "${TERM}" in (kterm*|xterm) | |
precmd() { | |
echo -ne "\033]0;${USER}@${HOST%%.*}:${PWD}\007" | |
} | |
esac | |
# PATH settings | |
PATH=~/local/bin:/usr/kerberos/bin:~/bin:/usr/local/bin:/bin:/usr/bin:/home/itochan/bin:/usr/local/tripwire/sbin:/sbin/:/usr/sbin:~/ruby/local/bin | |
case "${OSTYPE}" in (darwin*) | |
PATH=/usr/local/Cellar/ruby/1.9.2-p290/bin:$PATH | |
esac | |
if [[ -e ~/.zshrc_env ]]; then | |
source ~/.zshrc_env | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment