Added rvm prompt info
authorRobert R Evans <robert@codewranglers.org>
Sun, 10 Oct 2010 04:46:28 +0000 (21:46 -0700)
committerRobert R Evans <robert@codewranglers.org>
Sun, 10 Oct 2010 04:46:28 +0000 (21:46 -0700)
lib/aliases.bash
plugins/rvm.plugin.bash
themes/base.theme.bash
themes/bobby/bobby.theme.bash

index 49e89ce..76e1c1e 100644 (file)
@@ -17,6 +17,9 @@ alias -- -="cd -"       # Go back
 # Shell History
 alias h='history'
 
+# Tree
+alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
+
 # Directory
 alias  md='mkdir -p'
 alias  rd=rmdir
index 020bb3f..d3c81ed 100644 (file)
@@ -13,4 +13,4 @@ rvm_default () {
 
 function rvm_version () {
   ruby --version
-}
+}
\ No newline at end of file
index 8e2e2ee..d14e42b 100644 (file)
@@ -18,4 +18,10 @@ function parse_git_dirty {
 function git_prompt_info() {
   ref=$(git symbolic-ref HEAD 2> /dev/null) || return
   echo -e "$GIT_THEME_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$GIT_THEME_PROMPT_SUFFIX"
+}
+
+
+function rvm_version_prompt {
+  rvm=$(rvm tools identifier) || return
+  echo -e "$RVM_THEME_PROMPT_PREFIX$rvm$RVM_THEME_PROMPT_SUFFIX"
 }
\ No newline at end of file
index b9fa7aa..a12c62d 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 
-PROMPT="${bold_blue}\[\$(prompt_char)\]\[\$(git_prompt_info)\] ${orange}\h ${reset_color}in ${green}\w ${reset_color}\[→ "
+PROMPT="${bold_blue}\[\$(prompt_char)\]\[\$(git_prompt_info)\]${blue}\$(rvm_version_prompt) ${orange}\h ${reset_color}in ${green}\w ${reset_color}\[→ "
 
 # git theming
 GIT_THEME_PROMPT_DIRTY=" ${red}✗"
@@ -9,6 +9,9 @@ GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
 GIT_THEME_PROMPT_PREFIX=" ${green}|"
 GIT_THEME_PROMPT_SUFFIX="${green}|"
 
+RVM_THEME_PROMPT_PREFIX=" |"
+RVM_THEME_PROMPT_SUFFIX="|"
+
 
 #added TITLEBAR for updating the tab and window titles with the pwd
 case $TERM in