From: Robert R Evans Date: Sun, 10 Oct 2010 04:46:28 +0000 (-0700) Subject: Added rvm prompt info X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=698509adb065226be60670560a5ad59edae1f05e;p=common%2Fbash_it.git Added rvm prompt info --- diff --git a/lib/aliases.bash b/lib/aliases.bash index 49e89ce..76e1c1e 100644 --- a/lib/aliases.bash +++ b/lib/aliases.bash @@ -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 diff --git a/plugins/rvm.plugin.bash b/plugins/rvm.plugin.bash index 020bb3f..d3c81ed 100644 --- a/plugins/rvm.plugin.bash +++ b/plugins/rvm.plugin.bash @@ -13,4 +13,4 @@ rvm_default () { function rvm_version () { ruby --version -} +} \ No newline at end of file diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 8e2e2ee..d14e42b 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -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 diff --git a/themes/bobby/bobby.theme.bash b/themes/bobby/bobby.theme.bash index b9fa7aa..a12c62d 100644 --- a/themes/bobby/bobby.theme.bash +++ b/themes/bobby/bobby.theme.bash @@ -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