Skip to content

Instantly share code, notes, and snippets.

@watura
Created August 3, 2010 07:32
Show Gist options
  • Save watura/505999 to your computer and use it in GitHub Desktop.
Save watura/505999 to your computer and use it in GitHub Desktop.
## Language
#
export LANG="ja_JP.UTF-8"
export LC_ALL="ja_JP.UTF-8"
autoload -U compinit
compinit
setopt auto_cd
setopt auto_pushd
setopt nolistbeep
setopt noautoremoveslash
setopt auto_list
setopt hist_ignore_all_dups
## Prompt
#
PROMPT='%% '
RPROMPT="[%~]"
SPROMPT="correct: %R -> %r ? "
# historical backward/forward search with linehead string binded to ^P/^N
#
autoload history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^P" history-beginning-search-backward-end
bindkey "^N" history-beginning-search-forward-end
## History Config
#
HISTFILE=~/.zsh_history
HISTSIZE=100000
SAVEHIST=100000
setopt hist_ignore_dups
setopt share_history
#PATH & ALIAS
alias ls="ls -G"
export RUBYLIB=/opt/local/lib:$RUBYLIB
export PATH=/Users/watura/local/bin:/opt/local/bin:$PATH
export LSCOLORS=gxfxcxdxbxegedabagacad
function sshs(){
eval server=¥${$#}
screen -t $server ssh "$@"
}
zstyle ':completion:*:sudo:*' command-path $PATH /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usrX11R6/bin /Users/watura/local/bin
unsetopt promptcr #return always
case "${TERM}" in xterm-256color )
preexec() {
echo -ne "k${1%% *}¥¥"
}
precmd() {
echo -ne "k$(basename $(pwd))¥¥"
}
esac
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
function chpwd() { ls }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment