-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
54 lines (41 loc) · 1.42 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
# -*- mode: sh; eval: (sh-set-shell "zsh" nil nil) -*-
fpath=(${HOME}/.zsh.d/completions $fpath)
zstyle ':completion:*' completer _expand _complete _ignored
zstyle ':completion:*' completions 1
zstyle ':completion:*' glob 1
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' substitute 1
zstyle ':completion:*' use-compctl true
autoload -Uz colors && colors
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory extendedglob nomatch notify
bindkey -e
bindkey '^[[1;5C' emacs-forward-word
bindkey '^[[1;5D' emacs-backward-word
function _my_prompt_color () {
print "%{$fg_bold[$1]%}$2%{$reset_color%}"
}
TIMEFMT='%J
%U user %S system %P cpu %*E total %M MB'
PROMPT_USER=$(_my_prompt_color 'blue' '%n')
PROMPT_AT=$(_my_prompt_color 'green' '@')
PROMPT_MACHINE=$(_my_prompt_color 'white' '%2m')
PROMPT_PWD=$(_my_prompt_color 'cyan' '%.')
PROMPT_JOBS=$(_my_prompt_color 'red' '%(1j.[%j].)')
PROMPT=''
PROMPT_ARRAY=($PROMPT_USER $PROMPT_AT $PROMPT_MACHINE ' ' $PROMPT_PWD $PROMPT_JOBS '> ')
PROMPT=${(j::)PROMPT_ARRAY}
eval "$(direnv hook zsh)"
if [[ -f ~/.shell_common ]]; then
source ~/.shell_common
else
echo "Error: ~/.shell_common does not exist"
fi
if [[ -f ~/.zshrc.$(hostname -s) ]]; then
source ~/.zshrc.$(hostname -s)
fi
autoload -Uz compinit && compinit