Include home binaries in path before doing checks.

master
Icedream 2018-02-19 11:13:15 +01:00
parent 9cb4f1f2d3
commit b96f4ba9b2
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 16 additions and 8 deletions

View File

@ -53,6 +53,18 @@ log() {
fi
}
##############################################################################
# home bin
# Including this before doing any checks is crucial for detecting user-local
# installed binaries.
section "home bin"
if [ $PROFILE_BIN -gt 0 ]; then
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
export PATH
fi
section_end
##############################################################################
# Profile tweaks and features
@ -75,17 +87,13 @@ PROFILE_SYSTEMD=${PROFILE_SYSTEMD:-$(when_binary_available systemctl)}
PROFILE_THEFUCK=${PROFILE_THEFUCK:-$(when_binary_available thefuck)}
PROFILE_YARN=${PROFILE_YARN:-$(when_binary_available yarn)}
section "profile variables"
set | grep '^PROFILE_'
section_end
##############################################################################
# Actual profile code from here
# home bin
section "home bin"
if [ $PROFILE_BIN -gt 0 ]; then
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
export PATH
fi
section_end
section "thefuck"
if [ $PROFILE_THEFUCK -gt 0 ]; then
eval "$(thefuck --alias)"