Setup $PATH
to prepend local installs and ensure all the usual system paths
are present preserving preference order.
Born out of a hate of systems removing sbin
directories from my $PATH
(fuck
you there is no a good reason to do this).
Also removes empty items in $PATH
because I think blindly having CWD
$PATH
is insane.
export PATH=$(
printf '%s:' ~/bin ~/.{cargo,ghc,go}/bin ${PATH} {,/usr,/usr/local}/{,s}bin |
awk 'BEGIN {RS=":"} $0 && !seen[$0]++' |
paste -s -d ':' -
)
hash -r