Created
June 21, 2013 13:28
-
-
Save stibear/5831119 to your computer and use it in GitHub Desktop.
.zshrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .zshrc file for zsh(1) | |
## Completion configuration | |
autoload -U -U compinit | |
compinit | |
zstyle ':completion:*' list-colors 'di=34' 'ln=35' 'so=32' 'ex=31' 'bd=46;34' 'cd=43;34' | |
## Environment variable configuration | |
# LANG | |
export LANG=ja_JP.UTF-8 | |
case ${UID} in | |
0) | |
LANG=C | |
;; | |
esac | |
## Default shell configuration | |
# set prompt | |
autoload -U colors | |
colors | |
case ${UID} in | |
0) | |
PROMPT="%{[34m%}%m:%n%%%{[m%} " | |
RPROMPT="[%~]" | |
PROMPT2="%{[34m%}%_#%{[m%} " | |
SPROMPT="%B%{[34m%}%r is correct? [n,y,a,e]:%{[m%}%b " | |
[ -n "${REMOTEHOST}${SSH_CONNECTION}" ] && | |
PROMPT="%{[31m%}${HOST%%.*} ${PROMPT}" | |
;; | |
*) | |
PROMPT="%{[34m%}%m:%n%%%{[m%} " | |
RPROMPT="[%~]" | |
PROMPT2="%{[34m%}%_%%%{[m%} " | |
SPROMPT="%{[34m%}%r is correct? [n,y,a,e]:%{[m%} " | |
[ -n "${REMOTEHOST}${SSH_CONNECTION}" ] && | |
PROMPT="%{[31m%}${HOST%%.*} ${PROMPT}" | |
;; | |
esac | |
## Command history configuration | |
HISTFILE=~/.zsh_history | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
setopt hist_ignore_dups # ignore duplication command history list | |
setopt share_history # share command history data | |
## Keybind configuration | |
# emacs like keybind | |
# looking up is 'bindkey -L' | |
bindkey -e | |
## auto change directory | |
setopt auto_cd | |
## auto directory pushd that you can get dirs list by cd -[tab] | |
#setopt auto_pushd | |
## command correct edition before each completion attempt | |
setopt correct | |
## compacked complete list display | |
setopt list_packed | |
## auto command suggest | |
autoload -U predict-on | |
predict-on | |
## no remove postfix slash of command line | |
setopt noautoremoveslash | |
## Alias | |
alias ls="ls --color=auto -G" | |
alias battery="acpi -b" | |
alias su="su -l" | |
alias l="ls --color=auto -G" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment