Skip to content

Instantly share code, notes, and snippets.

@machisuji
Created May 9, 2018 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machisuji/62eb935a6bac529eca9a2e8ea5d75d3c to your computer and use it in GitHub Desktop.
Save machisuji/62eb935a6bac529eca9a2e8ea5d75d3c to your computer and use it in GitHub Desktop.
#!/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