.zshrc
author Shingo W. Kagami
Fri, 22 Jan 2010 22:54:09 +0900
changeset 8 259bcb382069
parent 2 56b84756a819
child 9 a38aec29a244
permissions -rw-r--r--
Untabify .zshrc.
Shingo@0
     1
# Lines configured by zsh-newuser-install
Shingo@0
     2
Shingo@0
     3
HISTFILE=~/.histfile
Shingo@0
     4
HISTSIZE=1000000
Shingo@0
     5
SAVEHIST=1000000
Shingo@0
     6
setopt appendhistory
Shingo@0
     7
setopt share_history
Shingo@0
     8
setopt hist_ignore_dups
Shingo@0
     9
setopt auto_pushd
Shingo@0
    10
setopt magic_equal_subst
Shingo@0
    11
bindkey -e
Shingo@0
    12
# End of lines configured by zsh-newuser-install
Shingo@0
    13
# The following lines were added by compinstall
Shingo@0
    14
# zstyle :compinstall filename '/home/swk/.zshrc'
Shingo@0
    15
Shingo@0
    16
fpath=($fpath /usr/share/zsh/functions/Zle)
Shingo@0
    17
autoload -U compinit
Shingo@0
    18
compinit -u
Shingo@0
    19
# End of lines added by compinstall
Shingo@0
    20
Shingo@0
    21
autoload history-search-end
Shingo@0
    22
zle -N history-beginning-search-backward-end history-search-end
Shingo@0
    23
zle -N history-beginning-search-forward-end history-search-end
Shingo@0
    24
bindkey '^P' history-beginning-search-backward-end
Shingo@0
    25
bindkey '^N' history-beginning-search-forward-end
Shingo@0
    26
Shingo@0
    27
export CVS_RSH=ssh
Shingo@0
    28
export RSYNC_RSH=ssh
Shingo@0
    29
export EDITOR=vi
Shingo@0
    30
export PAGER=less
Shingo@0
    31
export JLESSCHARSET=ja
Shingo@0
    32
export LS_COLORS="di=31:ex=34:ln=46:pi=0:so=0:cd=0:bd=0"
Shingo@0
    33
Shingo@0
    34
alias ls="ls --color=tty"
Shingo@0
    35
alias l="ls -l"
Shingo@0
    36
alias lynx="lynx -nopause"
Shingo@0
    37
Shingo@0
    38
case "$OSTYPE" in
Shingo@0
    39
    freebsd*)
Shingo@8
    40
        alias ls="gnuls --color=tty"
Shingo@8
    41
        alias emacs=emcws
Shingo@8
    42
        alias less=jless
Shingo@8
    43
        ;;
Shingo@0
    44
    cygwin)
Shingo@0
    45
        alias start=cygstart
Shingo@8
    46
        alias ls="ls --color=tty --show-control-chars"
Shingo@2
    47
        if [ -e ${HOME}/.zshrc.cygwin ]; then
Shingo@2
    48
            source ${HOME}/.zshrc.cygwin
Shingo@2
    49
        fi
Shingo@8
    50
        ;;
Shingo@0
    51
esac
Shingo@0
    52
Shingo@0
    53
PROMPT=$'%{\e[35m%}%m%#%{\e[m%} '
Shingo@0
    54
precmd() { RPROMPT="[$PWD]" }
Shingo@0
    55
Shingo@0
    56
dirbase() { basename `pwd` }
Shingo@0
    57
chpwd() { [ "x$TERM" = "xscreen" ] && echo -n "\ek`hostname | cut -b 1-3`:`dirbase`\e\\" }
Shingo@0
    58
Shingo@0
    59
chpwd