7 zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z} r:|[/]=* r:|=*'
8 zstyle ':completion:*' use-cache true
10 if [ -d "$HOME/.zfunc" ]; then
11 fpath=($HOME/.zfunc $fpath)
12 autoload -U ~/.zfunc/*(:t)
16 unfunction $f:t 2> /dev/null
21 if [ -f "$HOME/.ssh/known_hosts" ]; then
22 _cache_hosts=(`perl -ne 'if (/^([a-zA-Z0-9.-]+)/) { print "$1\n";}' ~/.ssh/known_hosts`)
33 setopt auto_param_keys
34 setopt auto_param_slash
35 setopt auto_remove_slash
38 setopt complete_aliases
45 setopt pushd_ignore_dups
47 setopt sh_file_expansion
48 setopt always_last_prompt
50 setopt hist_ignore_all_dups
51 setopt hist_ignore_space
52 setopt inc_append_history
55 function _we_are_in_gnu_screen () {
59 _prompt_base='%B[%n@%m] %{%(?.$fg[green].$fg[red])%}%#%{$reset_color%}%b '
60 if ( _we_are_in_gnu_screen ); then
61 # GNU Screen has a capability to set its window title by "ESC k
62 # {string} ESC \". We want to reset the title to `_' to show we
63 # aren't running any command now.
64 PROMPT=$'%{\ek_\e\\%}'$_prompt_base
69 function preexec() { # Hook
70 if { _we_are_in_gnu_screen } then
71 # Set the window title of GNU Screen.
72 local cmd=${1[(wr)^(*=*|sudo|nice|env|time|-*|[0-9]*)]}
77 function chpwd() { # Hook
78 local dirinfo=$(print_directory_info $(pwd))
84 RPROMPT="%U%~%u %U($dirinfo)%u";;
88 function print_directory_info() {
91 if [[ -d $absdir/.git ]] then
93 git branch --no-color 2>/dev/null \
94 | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
96 elif [[ -d $absdir/.hg ]] then
100 elif [[ -d $absdir/_darcs ]] then
104 elif [[ -r $absdir/CVS/Repository ]] then
106 cat $absdir/CVS/Repository \
107 | sed -e 's!\([^/]*\).*!\1!'
111 if [[ $absdir = "/" ]] then
112 # This is the root directory so exit from the recursion.
115 # Recurse to the parent dir.
116 print_directory_info $(dirname $absdir)
122 HISTFILE="$HOME/.zhistory"
126 alias -g L="| $PAGER"
137 alias ed='ed -p "ed> "'
140 alias mwget="wget --user-agent='Mozilla/1.4b'"
141 alias pstow="pushd /usr/local/stow"
142 alias w3m="w3m -O UTF-8"
143 alias w3mb="w3m -O UTF-8 -B"
144 alias pkgsrc="pushd /usr/pkgsrc"
146 alias aria="ssh -X admin@aria.cielonegro.org"
147 alias nem="ssh -X pho@nem.cielonegro.org"
148 alias mikasa="ssh -X daimon@mikasa.tomilab.net"
150 alias aria-emacs="ssh -f -X admin@aria.cielonegro.org emacsclient -c"
152 alias g1="ssh pho@g1.cuenote.jp"
153 alias g2="ssh pho@g2.cuenote.jp"
154 alias mana="ssh pho@mana"
156 if [ $(hostname) = "aria.cielonegro.org" ]; then
157 alias safari="open -a Safari"
158 alias unstuff='open -a StuffIt\ Expander.app'
159 alias pa='open -a NiseRingo.app'
160 alias heboris='open /Applications/HeborisUEMac/exe/Heboris\ OpenGL.app'
161 alias hengband='open ~/Applications/hengband*/Hengband*'
164 if [ $(uname) = "Darwin" ]; then
172 alias top='/usr/bin/top -X -o cpu'
180 # The following lines were added by compinstall
182 zstyle :compinstall filename "$HOME/.zshrc"
186 # End of lines added by compinstall
188 if [ "x$WINDOW" = "x" ]; then
189 if which fortune 2>&1 >/dev/null; then
194 if [ -e ".motd" ]; then
198 if which ssh-agent-manager 2>&1 >/dev/null; then
199 eval `ssh-agent-manager -s`