-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshenv
82 lines (62 loc) · 1.49 KB
/
dot_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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Environment variables
# discard duplicates from both PATH and path
typeset -U PATH path
# Skip the not really helping Ubuntu global compinit
skip_global_compinit=1
if [ -d $HOME/go ]; then
export GOPATH=$HOME/go
fi
BIN_DIRS=(
/snap/bin
$HOME/.homebrew/bin
$HOME/.local/bin
$HOME/go/bin
$HOME/.cargo/bin
)
for d in $BIN_DIRS; do
if [ -d "$d" ]; then
path+=("$d")
fi
done
export PATH
typeset -U XDG_DATA_DIRS xdg_data_dirs
XDG_DIRS=(
/var/lib/flatpak/exports/share
$HOME/.local/share/flatpak/exports/share
)
for d in $XDG_DIRS; do
if [ -d "$d" ]; then
xdg_data_dirs+=("$d")
fi
done
export XDG_DATA_DIRS
# Free Desktop XDG vars
export XDG_CONFIG_HOME=$HOME/.config
export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
# XDG shims for unsupported apps
export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
# .extra contains environment variables that shouldn't be in source control.
if [ -f $HOME/.extra ]; then
source $HOME/.extra
fi
# Don’t clear the screen after quitting a manual page
export MANPAGER="less -X"
export PAGER=less
if command -v moar &> /dev/null; then
export PAGER=moar
fi
if command -v hx &> /dev/null; then
export EDITOR=hx
elif command -v nvim &> /dev/null; then
export EDITOR=nvim
elif command -v vim &> /dev/null; then
export EDITOR=vim
else
export EDITOR=vi
fi
# Prefer GB English and use UTF-8
export LANG="en_GB.UTF-8"
export LC_ALL="en_GB.UTF-8"
export OSNAME=$(uname | tr '[:upper:]' '[:lower:]')