Shingo@0: HISTFILE=~/.histfile
Shingo@0: HISTSIZE=1000000
Shingo@0: SAVEHIST=1000000
Shingo@0: setopt appendhistory
Shingo@0: setopt share_history
Shingo@0: setopt hist_ignore_dups
Shingo@0: setopt auto_pushd
Shingo@0: setopt magic_equal_subst
Shingo@9: 
Shingo@0: bindkey -e
Shingo@9: fpath=($fpath /usr/share/zsh/functions/Zle)
Shingo@0: 
Shingo@0: autoload -U compinit
Shingo@0: compinit -u
Shingo@0: 
Shingo@0: autoload history-search-end
Shingo@0: zle -N history-beginning-search-backward-end history-search-end
Shingo@0: zle -N history-beginning-search-forward-end history-search-end
Shingo@0: bindkey '^P' history-beginning-search-backward-end
Shingo@0: bindkey '^N' history-beginning-search-forward-end
Shingo@0: 
Shingo@0: export CVS_RSH=ssh
Shingo@0: export RSYNC_RSH=ssh
Shingo@0: export EDITOR=vi
Shingo@0: export PAGER=less
Shingo@0: export JLESSCHARSET=ja
Shingo@0: export LS_COLORS="di=31:ex=34:ln=46:pi=0:so=0:cd=0:bd=0"
Shingo@0: 
Shingo@0: alias ls="ls --color=tty"
Shingo@0: alias l="ls -l"
Shingo@0: alias lynx="lynx -nopause"
Shingo@0: 
Shingo@0: case "$OSTYPE" in
Shingo@0:     freebsd*)
Shingo@8:         alias ls="gnuls --color=tty"
Shingo@8:         alias emacs=emcws
Shingo@8:         alias less=jless
Shingo@8:         ;;
Shingo@0:     cygwin)
Shingo@0:         alias start=cygstart
Shingo@8:         alias ls="ls --color=tty --show-control-chars"
Shingo@2:         if [ -e ${HOME}/.zshrc.cygwin ]; then
Shingo@2:             source ${HOME}/.zshrc.cygwin
Shingo@2:         fi
Shingo@8:         ;;
Shingo@0: esac
Shingo@0: 
Shingo@0: PROMPT=$'%{\e[35m%}%m%#%{\e[m%} '
Shingo@0: 
Shingo@11: HOST3=`hostname | cut -b 1-3`
Shingo@11: precmd() {
Shingo@11:     local PWD2=${PWD/#$HOME/\~}
Shingo@11:     local DTRUN=$PWD2:t
Shingo@11:     local DBASE=${DTRUN:-/}
Shingo@11:     RPROMPT="[$PWD2]"
Shingo@11:     [ "x$TERM" = "xscreen" ] && echo -n "\ek$HOST3:$DBASE\e\\"
Shingo@11: }