Skip to content

Instantly share code, notes, and snippets.

@Shinpeim
Created May 19, 2012 16:10
Show Gist options
  • Save Shinpeim/2731347 to your computer and use it in GitHub Desktop.
Save Shinpeim/2731347 to your computer and use it in GitHub Desktop.
precmd () {
psvar=()
psvar[1]=$(ruby -v | sed -e 's/ruby \([0-9]*.[0-9]*.[0-9]*\).*/\1/');
}
PS1="[%1v]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment