mirror of
https://github.com/meineerde/dotfiles.git
synced 2026-02-06 00:53:23 +00:00
Show Ruby version in PS1 using various possible means
This commit is contained in:
parent
f41e33a747
commit
001cd7ff74
11
.bashrc
11
.bashrc
@ -177,7 +177,16 @@ ps1_host='\h'
|
||||
|
||||
. $HOME/bin/bash_vcs.sh
|
||||
ps1_vcs='$(__prompt_command)'
|
||||
ps1_ruby=' \[\e[0;34m\]$(rvm-prompt v g)\[\e[00m\]'
|
||||
if type rvm-prompt >/dev/null 2>&1; then
|
||||
ps1_ruby=' \[\e[0;34m\]$(rvm-prompt v g)\[\e[00m\]'
|
||||
elif [[ -n "$RUBY_VERSION" ]]; then
|
||||
ps1_ruby=' \[\e[0;34m\]$RUBY_VERSION\[\e[00m\]'
|
||||
elif type ruby >/dev/null 2>&1; then
|
||||
ps1_ruby=' \[\e[0;34m\]$(ruby -e "puts RUBY_VERSION")\[\e[00m\]'
|
||||
else
|
||||
ps1_ruby=''
|
||||
fi
|
||||
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user