-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshenv
62 lines (48 loc) · 1.36 KB
/
zshenv
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
# skip_global_compinit=1
# Path for custom completions
fpath=(~/.zsh/completion $fpath)
# Remove the zsh completion shipped by Homebrew git.
# https://github.com/Homebrew/homebrew-core/issues/33275
[[ -f /usr/local/share/zsh/site-functions/_git ]] && \
rm -f /usr/local/share/zsh/site-functions/_git
PATH="/usr/local/sbin:$PATH"
PATH="$PATH:/Library/TeX/texbin"
export GOPATH=$HOME/go
PATH="$PATH:$GOPATH/bin"
export ANDROID_HOME=/usr/local/opt/android-sdk
export PATH
# Allow user set host aliases
export HOSTALIASES=~/.hosts
# Set terminal to 256 colors if using an xterm compatible term
if [[ "$TERM" =~ xterm.* ]]; then
export TERM=screen-256color
fi
export EDITOR=nvim
export LC_ALL=en_US.UTF-8
# Use ag for default fzf search
export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'
#export FZF_DEFAULT_OPTS='--exact'
export ZSH_CACHE_DIR=~/.zsh/cache
DISABLE_AUTO_TITLE="true"
if [ -n "$TMUX" ]; then
function refresh {
sshauth=$(tmux show-environment | grep "^SSH_AUTH_SOCK")
if [ $sshauth ]; then
export $sshauth
fi
sshpid=$(tmux show-environment | grep "^SSH_AGENT_PID")
if [ $sshpid ]; then
export $sshpid
fi
display=$(tmux show-environment | grep "^DISPLAY")
if [ $display ]; then
export $display
fi
}
else
function refresh { }
fi
function preexec {
# Refresh environment if inside tmux
refresh
}