dotfiles/home/private_dot_bashrc.d/pathmunge

17 lines
315 B
Text
Raw Normal View History

2025-01-22 09:20:19 +01:00
# vim: filetype=sh
# .bashrc.d/pathmunge
# Create pathmunge to avoid path duplications
pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}