about summary refs log tree commit diff
path: root/.config/zsh/.zshenv
blob: ce62ecf692bfa7cf55bac039429fb68e7f79a749 (plain) (blame)
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
export EDITOR='vim'
export PAGER='less'
export LESS='--RAW-CONTROL-CHARS'
export GPG_TTY=$TTY

export PATH=$HOME/.local/bin:$PATH

if [[ $INTELLIJ -eq 1 ]]; then
	export PATH=/usr/local/bin:/usr/bin:$PATH
fi

if [[ -n $XDG_RUNTIME_DIR ]]; then
	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"
fi

[[ -f "$HOME/.cargo/env" ]] &&  . "$HOME/.cargo/env"

if command -v npm &> /dev/null; then
	export npm_config_prefix="$HOME/.local"
fi

if command -v bat &> /dev/null; then
	export MANPAGER="sh -c 'col -bx | bat --plain --language man'"
	# note that mandoc needs a wrapper script e.g.:
	# col -bx < "$1" | bat -p -l man
	# <https://github.com/sharkdp/bat/issues/1145>
fi