/
zshrc
105 lines (83 loc) · 2.83 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
eval `dircolors -b`
stty -ixon
autoload -U +X bashcompinit && bashcompinit
autoload -U promptinit
promptinit
prompt clint
function prompt() {
export PROMPT="%F{green}%~%f [$(git symbolic-ref --short HEAD 2> /dev/null)] @ $(git rev-parse --short HEAD 2> /dev/null)
%F{yellow}[%? ${1}ms]
%fλ "
}
prompt 0
function preexec() {
timer=$(($(date +%s%N)/1000000))
}
function precmd() {
if [ $timer ]; then
now=$(($(date +%s%N)/1000000))
elapsed=$(($now-$timer))
prompt $elapsed
unset timer
fi
}
autoload -U compinit
compinit
autoload -U edit-command-line
zle -N edit-command-line
autoload up-line-or-beginning-search
autoload down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search
bindkey "^[[B" down-line-or-beginning-search
setopt histignorealldups
setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups
setopt extendedglob
setopt vi
setopt promptsubst
setopt globdots
setopt histreduceblanks
setopt histignorespace
setopt SH_WORD_SPLIT
setopt automenu
#setopt cdablevars
setopt nohup
setopt listpacked
setopt nolisttypes
setopt completeinword
setopt alwaystoend
#setopt correct
setopt interactivecomments
setopt inc_append_history_time
#setopt share_history
export HISTFILE=~/.zsh_history
export HISTSIZE=500000
export SAVEHIST=500000
bindkey "^xe" edit-command-line
bindkey "^x^e" edit-command-line
bindkey '^?' backward-delete-char
bindkey '^[[7~' beginning-of-line
bindkey '^[[8~' end-of-line
bindkey "^P" vi-up-line-or-history
bindkey "^N" vi-down-line-or-history
bindkey "^[[1~" vi-beginning-of-line # Home
bindkey "^[[4~" vi-end-of-line # End
bindkey '^[[5~' vi-backward-blank-word # Page Up
bindkey '^[[6~' vi-forward-blank-word # Page Down
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
# case-insensitive (uppercase from lowercase) completion
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
# process completion
zstyle ':completion:*:processes' command 'ps -au$USER'
zstyle ':completion:*:*:kill:*:processes' list-colors "=(#b) #([0-9]#)*=36=31"
zstyle ':completion:*' completer _expand _complete _ignored _approximate
zstyle ':completion:*' menu select=2
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle ':completion:*:descriptions' format '%U%F{yellow}%d%f%u'
# added by travis gem
[ -f /home/florian/.travis/travis.sh ] && source /home/florian/.travis/travis.sh
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/florian/Downloads/google-cloud-sdk/path.zsh.inc' ]; then source '/home/florian/Downloads/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/florian/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then source '/home/florian/Downloads/google-cloud-sdk/completion.zsh.inc'; fi