-
-
Save soveran/da4cd5674373e7f6042a to your computer and use it in GitHub Desktop.
Display the current gemset in your prompt.
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
# The important bit in this short example | |
# is the call to the _gemset function. | |
export PS1='$(_gemset)\w \$ ' | |
# This function checks if the GS_NAME variable | |
# has a value and returns either an empty string | |
# or the name of the current gemset. | |
_gemset() { | |
if [[ -z $GS_NAME ]]; then | |
echo "" | |
else | |
echo "$GS_NAME " | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment