/
zshrc.linux
77 lines (67 loc) · 1.44 KB
/
zshrc.linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# zsh setting
# DEFAULT {{{
if [ -e /etc/zshrc ]; then
source /etc/zshrc
fi
# }}}
# KEYBIND {{{
bindkey -e
stty erase "^?"
# }}}
# COLOR {{{
autoload -Uz colors
zstyle ':completion:*' verbose yes
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
colors
# }}}
# COMPLEMENT {{{
autoload -Uz compinit; compinit
# }}}
# COMMAND_HISTORY {{{
setopt extended_history
setopt share_history
setopt hist_ignore_dups
setopt pushd_ignore_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
# }}}
# PROMPT {{{
PROMPT='%F{red}$(date "+%Y/%m/%d %H:%M:%S") %n@%m'
RPROMPT='%B%F{red}[%d]%f%b'
autoload -Uz vcs_info
setopt prompt_subst
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr "%F{yellow}!"
zstyle ':vcs_info:git:*' unstagedstr "%F{red}+"
zstyle ':vcs_info:*' formats "%F{green}%c%u[%b]%f"
zstyle ':vcs_info:*' actionformats '[%b|%a]'
precmd () { vcs_info }
PROMPT=$PROMPT' ${vcs_info_msg_0_}''%F{red}%#%f '
# }}}
# ALIASES {{{
alias date="env LC_ALL=c date"
alias cp="cp -iv"
alias mv="mv -iv"
alias rm="rm -iv"
alias g++='g++ -Wall '
alias gcc='gcc -Wall '
alias ll='ls -al --color=auto'
alias ls='ls --color=auto'
alias history='history -i '
# }}}
# OPTIONS {{{
setopt print_eight_bit
setopt auto_cd
setopt auto_pushd
setopt pushd_ignore_dups
setopt correct
# }}}
# LOCAL {{{
if [ -e ~/.zshrc_local ]; then
source ~/.zshrc_local
fi
# }}}
# vim:ts=4:sw=4 syntax=zsh