-
Notifications
You must be signed in to change notification settings - Fork 2
/
.zshrc
49 lines (34 loc) · 1.1 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
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
unsetopt beep
bindkey -e
export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH"
ZSH_CACHE="$HOME/.zsh/comp-cache-${ZSH_VERSION}"
mkdir -p $ZSH_CACHE
chmod 700 $ZSH_CACHE
if type "brew" &> /dev/null; then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi
autoload -Uz compinit
compinit -d "$ZSH_CACHE/zcompdump"
zstyle ':completion::complete:*' use-cache 1
zstyle ':completion::complete:*' cache-path $ZSH_CACHE
# enable autocomplete for g git alias
compdef g='git'
fpath=(/usr/local/share/zsh-completions $fpath)
# disable paste highlighting
zle_highlight+=(paste:none)
autoload -Uz vcs_info
precmd() { vcs_info }
zstyle ':vcs_info:git:*' formats ' (%b)'
setopt PROMPT_SUBST
PROMPT='%n@%m:${PWD/#$HOME/~}${vcs_info_msg_0_} \$ '
# include shell agnostic configuration
[[ -s "$HOME/.commonrc" ]] && source "$HOME/.commonrc"
# load dev, but only if present and the shell is interactive
if [[ -f /opt/dev/dev.sh ]] && [[ $- == *i* ]]; then
source /opt/dev/dev.sh
fi
export PATH=".git/safe/../../bin:$PATH"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh