10-locals.zsh 464 Bytes
Newer Older
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
# Override first bin directory

# Depending on your distro, your ~/.profile may already be providing
# this information

if [ -d "$HOME/bin" ]
then
	if [[ "$PATH" =~ "$HOME/bin" ]]
	then
		# Do nothing
		:
	else
		export PATH="$HOME/bin:$PATH"
	fi
fi

if [ -d "$HOME/.local/bin" ]
then
	if [[ "$PATH" =~ "$HOME/.local/bin" ]]
	then
		# Do nothing
		:
	else
		export PATH="$HOME/.local/bin:$PATH"
	fi
fi

# Remove duplicates in $PATH, if they exist
typeset -U path