Simplify adding directories to path by using $path array
This commit is contained in:
parent
e4f2a41e1f
commit
5a50b6be66
14
.zshenv
14
.zshenv
@ -20,17 +20,9 @@ export CALIBRE_USE_SYSTEM_THEME=true
|
|||||||
|
|
||||||
export WINEDLLOVERRIDES=winemenubuilder.exe=d
|
export WINEDLLOVERRIDES=winemenubuilder.exe=d
|
||||||
|
|
||||||
# Add $HOME/.bin to PATH if it exists and is not already in the path
|
# Don't allow duplicate values in path
|
||||||
if [[ -d "$HOME/.bin" ]] && ! grep -q ":$HOME"'/\.bin\(:\|$\)' <<< "$PATH"
|
typeset -U path
|
||||||
then
|
path=($HOME/.bin $HOME/.dotfiles/ $path)
|
||||||
export PATH="$PATH:$HOME/.bin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add $HOME/.dotfiles to PATH if it exists and is not already in the path
|
|
||||||
if [[ -d "$HOME/.dotfiles" ]] && ! grep -q ":$HOME"'/\.dotfiles\(:\|$\)' <<< "$PATH"
|
|
||||||
then
|
|
||||||
export PATH="$PATH:$HOME/.dotfiles"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set temporary files locations
|
# Set temporary files locations
|
||||||
if [[ ! -d "$TMPDIR" ]]
|
if [[ ! -d "$TMPDIR" ]]
|
||||||
|
Loading…
Reference in New Issue
Block a user