-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
58 lines (47 loc) · 1.34 KB
/
.zshrc
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
alias myip='dig +short myip.opendns.com @resolver1.opendns.com'
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd extendedglob nomatch notify prompt_subst
unsetopt beep
bindkey -v
precmd() {
RPROMPT=""
}
zle-keymap-select() {
RPROMPT=""
[[ $KEYMAP = vicmd ]] && RPROMPT="(CMD)"
() { return $__prompt_status }
zle reset-prompt
}
zle-line-init() {
typeset -g __prompt_status="$?"
}
zle -N zle-keymap-select
zle -N zle-line-init
zstyle :compinstall filename '/home/steffen/.zshrc'
export EDITOR=vim
autoload -U compinit promptinit colors
compinit
promptinit
if [[ "$terminfo[colors]" -ge 8 ]]; then
colors
fi
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval C$color[1,1]="%{$terminfo[bold]$fg[${(L)color}]%}"
eval CL$color[1,1]="%{$fg[${(L)color}]%}"
done
RC="%{$reset_color%}"
GO="%{$CC%}[%{$RC%}"
GC="%{$CC%}]%{$RC%}"
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' actionformats "%{$GO%}%{$CW%}%b%{$RC%}%{$GC%}%{$CLR%}%u%{$CLG%}%c%{$RC%}(%a)"
zstyle ':vcs_info:*' formats "%{$GO%}%{$CW%}%b%{$RC%}%{$GC%}%{$CLR%}%u%{$CLG%}%c%{$RC%}"
zstyle ':vcs_info:*' branchformat '%b'
zstyle ':vcs_info:*' unstagedstr '+'
zstyle ':vcs_info:*' stagedstr '*'
zstyle ':vcs_info:*' check-for-changes true
precmd() { vcs_info }
PROMPT='%{$CB%}%(4~,../,)%3~ ${vcs_info_msg_0_}
%{$CG%}>: %{$RC%}'