-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.zsh
77 lines (64 loc) · 1.6 KB
/
env.zsh
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
# PATH stuff
typeset -U path
# Homebrew for Apple Silicon
if [[ -x /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
prepend_path /opt/homebrew/bin
prepend_path /opt/homebrew/sbin
fi
# Homebrew for Apple x86_64
if [[ -x /usr/local/bin/brew ]]; then
eval "$(/usr/local/bin/brew shellenv)"
prepend_path /usr/local/bin
prepend_path /usr/local/sbin
fi
# Local binaries
prepend_path ~/bin
# Language settings
export LANG='en_US.UTF-8'
export LC_CTYPE='en_US.UTF-8'
# CTAGS sorting in VIM/Emacs is better behaved with this in place
export LC_COLLATE=C
# Enable color in grep
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='3;33'
if [[ "$OSTYPE" == darwin* ]]; then
export BROWSER='open'
fi
export EDITOR='vim'
export PAGER='less'
export LESSCHARSET='utf-8'
# Java
JAVA_HOME_PATH=/usr/libexec/java_home
if [[ -x $JAVA_HOME_PATH ]]; then
export JAVA_HOME=`$JAVA_HOME_PATH`
fi
# pipx
if (( $+commands[pipx] )); then
prepend_path $HOME/.local/bin
fi
# pyenv
if (( $+commands[pyenv] )); then
export PYENV_ROOT="$HOME/.pyenv"
eval "$(pyenv init -)"
fi
# TCL/Tk
TK_BIN_PATH=${HOMEBREW_PREFIX}/opt/tcl-tk/bin
if [[ -x $TK_BIN_PATH ]]; then
append_path $TK_BIN_PATH
fi
# TEX Live
TEXLIVE_DIR=${HOMEBREW_PREFIX}/texlive/2021
if [[ -d $TEXLIVE_DIR ]]; then
append_path ${TEXLIVE_DIR}/bin/universal-darwin
fi
# McFly Ctrl-R replacement
if (( $+commands[mcfly] )); then
export MCFLY_KEY_SCHEME=vim
export MCFLY_FUZZY=2
eval "$(mcfly init zsh)"
fi
# Fzf Ctrl-R replacement
if (( $+commands[fzf] )); then
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
fi