Created
June 13, 2016 00:54
-
-
Save roktas/af7a536e2e5d85064b8b45409fa3d37b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# munge PATH | |
pathmunge() { | |
case ":${PATH}:" in *:"$1":*) return 0 ;; esac | |
[ "$2" = after ] && PATH=$PATH:$1 || PATH=$1:$PATH | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment