-
Notifications
You must be signed in to change notification settings - Fork 65
/
.profile
74 lines (60 loc) · 2.01 KB
/
.profile
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
# This file gets sourced by every login shell.
# PATH {{{1
newpath=(
# homebrew (keg-only)
/usr/local/sbin
/usr/local/opt/coreutils/libexec/gnubin
/usr/local/opt/ncurses/bin
/usr/local/opt/ruby/bin
/usr/local/lib/ruby/gems/*/bin
/usr/local/opt/llvm/bin
~/data/go/bin # $GOPATH
~/.npm/bin
~/.asdf/bin
~/.asdf/shims
~/.cargo/bin
~/local/*/bin
~/bin
)
# Apple's path_helper gets called from /etc/profile and
# /etc/zprofile and mangles $PATH. Work around it.
if [[ -x /usr/libexec/path_helper ]]; then
PATH=
eval "$(/usr/libexec/path_helper -s)"
fi
# Only unique elements, please.
for dir in "${newpath[@]}"; do
case $PATH in
*:"$dir":*) ;;
*) [[ -d $dir ]] && PATH="$dir:$PATH" ;;
esac
done
export PATH
unset newpath dir
# }}}
export ME=$HOME/data
export LANG=en_US.UTF-8
export FZF_DEFAULT_COMMAND="rg --files --hidden --glob '!.git'"
export FZF_DEFAULT_OPTS='--inline-info --color=light'
export RIPGREP_CONFIG_PATH="$HOME/.config/rg/rgrc"
export ELIXIR_EDITOR='ec +__LINE__ __FILE__'
export GOPATH=$ME/go
export GOARCH=amd64
export GOOS="$(uname -s | tr '[:upper:]' '[:lower:]')"
export PGDATA=/usr/local/var/postgres
if command -v nvim 1>/dev/null; then export EDITOR='nvim'
elif command -v vim 1>/dev/null; then export EDITOR='vim'
elif command -v vi 1>/dev/null; then export EDITOR='vi'
elif command -v emacs 1>/dev/null; then export EDITOR='emacs -nw'
elif command -v nano 1>/dev/null; then export EDITOR='nano'
else echo 'Install a proper editor.'
fi
export MANPATH=/usr/local/opt/coreutils/libexec/gnuman:"$MANPATH"
export MANPATH=/usr/local/opt/erlang/lib/erlang/man:"$MANPATH"
export MANPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:"$MANPATH"
export MANWIDTH=82
case "$EDITOR" in
nvim) export MANPAGER="nvim +'set ft=man' -" ;;
vim) export MANPAGER="/bin/sh -c \"col -b | vim -c 'set ft=man ro nomod nolist' -\"" ;;
*) export MANPAGER='less' ;;
esac