dotfiles/home/private_dot_bashrc.d/pathmunge
2025-01-22 09:20:19 +01:00

16 lines
315 B
Bash

# 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
}