Source

hello / snippets / dot.zshrc

Full commit

# Lines configured by zsh-newuser-install
umask 022

HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt extended_history
setopt share_history
setopt auto_remove_slash
setopt always_last_prompt
setopt auto_pushd
setopt list_packed

export LANG=ja_JP.UTF-8
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/man:$MANPATH
export EDITOR=emacs
export OUTPUT_CHARSET=UTF-8
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/kuenishi/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall


local GREEN=$'%{\e[1;32m%}'
local BLUE=$'%{\e[1;34m%}'
local DEFAULT=$'%{\e[1;m%}'

export HOSTNAME=`hostname`
export PROMPT=$BLUE'> %(!.#.$) '$DEFAULT
export RPROMPT=$GREEN'[${USER}@${HOSTNAME}:%~]'$DEFAULT
setopt PROMPT_SUBST
setopt NO_BEEP
setopt AUTOLIST

OUTPUTZ_KEY=c3hOxeU9q.Se
OUTPUTZ_API_URL=http://outputz.com/api/post

preexec() {
#    SIZE=`echo $argv[1] | wc -c | tr -d ' '`
#    URI=http://www.zsh.org/`echo ${argv[1]} | sed "s/ /_/g"`
#    POST_DATA="key=${OUTPUTZ_KEY}&uri=${URI}&size=${SIZE}"
#    CONTENT_TYPE="Content-Type: application/x-www-form-urlencoded"
#    wget -O - --header "$CONTENT_TYPE" --post-data="$POST_DATA" "$OUTPUTZ_API_URL" >& /dev/null
}


#http://0xcc.net/blog/archives/cat_7.html
#case "$TERM" in
#    xterm*|kterm*|rxvt*)
#    PROMPT=$(print "%B%{\e[34m%}%m:%(5~,%-2~/.../%2~,%~)%{\e[33m%}%# %b")
#    PROMPT=$(print "%{\e]2;%n@%m: %~\7%}$PROMPT") # title bar
#    ;;
#    *)
#    PROMPT='%m:%c%# '
#    ;;
#esac