.zshrc
研究室で無気力なので自分の設定ファイルを晒してみる。
たいしたことないんだけどね
########### #.zshrc #03 May 2006 #written by yagi #Ref http://q-eng.imat.eng.osaka-cu.ac.jp/~ippei/unix/zsh.html #未来の俺、これ読んで理解できるのか? ########## mesg n #talkとかで邪魔されない fpath=($HOME/.zsh $fpath) autoload -U colors #カラー書式 #ここから補間入力の設定 autoload -U compinit compinit -u compdef _files ns compdef _tex platex autoload -U predict-on zle -N predict-on setopt auto_cd #cdの補完(これ便利じゃね?) setopt correct #スペルミス修正 #history設定 HISTFILE="$HOME/.zhistory" HISTSIZE=10000 SAVEHIST=10000 setopt hist_ignore_all_dups #古い奴から削除 setopt hist_reduce_blanks #余計なスペースは排除 setopt share_history #複数シェルでヒストリを共有 bindkey -e #emacs キーバインド HHKだと便利かもね #history サーチ用キーバインド bindkey '^P' history-beginning-search-backward bindkey '^N' history-beginning-search-forward #エイリアス達 alias ls="ls --color" alias la="ls -a" alias ll="ls -al" #alias -g ナントカ でオプションのエイリアスも作れるらしい alias -g LE="| less" alias -g GR="| grep" #function 色々コマンドを複合化 function cd() { builtin cd $@ &&ls; } function xdvi() { command xdvi $* & } function emacs() { command emacs $* &} function less() { if [ $# != 0 ]; then command cat $@ | command less else command less fi } WORDCHARS='*?_-.[]~&!#$%^(){}<>' #単語の区切りにならない記号 #プロンプト PSCOLOR='00;04;32' #色 RPROMP=$'%{\e[${PSCOLOR}m%}[%~]%{\e[00m%}' #右 unsetopt promptcr #プロンプトが出力にかぶらないようにする setopt prompt_subst #escエスケープ有効(って何?) RPS1=$'%{\e[${PSCOLOR}m%}[%~]%{\e[00m%}' PS1=$'%{\e]2; %m:%~ \a'$'\e]1;%%: %~\a%}'$'\n%{\e[${PSCOLOR}m%}%n@%m ${WINDOW:+"[$WINDOW]"}%#%{\e[00m%} '
本気で頭回ってないので解説とか一切略