Last active
January 4, 2016 04:09
-
-
Save bolandrm/8567103 to your computer and use it in GitHub Desktop.
add ./bin to path if present (for spring)
This file contains hidden or 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
DEFAULT_PATH=$PATH | |
# ... | |
# add ./bin to path for Spring (rails) | |
add_bin_to_path_if_necessary() { | |
if [[ -d ./bin ]]; then | |
export PATH=./bin:$DEFAULT_PATH | |
else | |
export PATH=$DEFAULT_PATH | |
fi | |
} | |
# These get run before every command | |
function precmd() { | |
add_bin_to_path_if_necessary | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment