Created
May 9, 2018 10:40
-
-
Save machisuji/62eb935a6bac529eca9a2e8ea5d75d3c to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
function ruby_version { | |
if command -v ruby &> /dev/null; then | |
if [ -f ".ruby-version" ]; then | |
echo "ruby-$(ruby --version | cut -d " " -f 2) " | |
else | |
echo "" | |
fi | |
else | |
echo "" | |
fi | |
} | |
export PS1='\[\033[1;34m\]$(ruby_version)\[\033[0m\]\W$(__git_ps1 "\[\033[1;32m\] (%s)\[\033[0m\]") \$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment