diff --git a/README.md b/README.md index 105d5be7..4ab39333 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Bash it +My personal modifications :) + **Bash it** is a mash up of my own bash commands and scripts, other bash stuff I have found. (And a shameless ripoff of [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh). :) diff --git a/themes/zuper/zuper.theme.bash b/themes/zuper/zuper.theme.bash index 0b30dbab..ad470da0 100644 --- a/themes/zuper/zuper.theme.bash +++ b/themes/zuper/zuper.theme.bash @@ -9,6 +9,10 @@ SCM_THEME_PROMPT_SUFFIX="${white} ❯" GIT_SHA_PREFIX="${white} ❮ $(scm_char)${cyan} " GIT_SHA_SUFFIX="${white} ❯" +#SCM_GIT_CHAR="git ${red}|${white} " +#SCM_HG_CHAR="hg | " +#SCM_SVN_CHAR="svn ${red}|${white} " + #HG_SHA_PREFIX="${white} ❮ ${yellow}" #HG_SHA_SUFFIX="${reset_color}" @@ -18,9 +22,23 @@ function zuper_hg_prompt_info() { echo -e "$SCM_PREFIX${magenta}$(scm_char) ${cyan}$SCM_BRANCH$SCM_STATE$SCM_SUFFIX" } +function hg_prompt_vars { + if [[ -n $(hg status 2> /dev/null) ]]; then + SCM_DIRTY=1 + SCM_STATE=${HG_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY} + else + SCM_DIRTY=0 + SCM_STATE=${HG_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN} + fi + SCM_PREFIX=${HG_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX} + SCM_SUFFIX=${HG_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX} + SCM_BRANCH=$(hg summary 2> /dev/null | grep branch: | awk '{print $2}') + SCM_CHANGE=$(hg summary 2> /dev/null | grep parent: | awk '{print $2}') +} + function zuper_git_prompt_info { git_prompt_vars - echo -e "$SCM_PREFIX${magenta}$(scm_char) ${cyan}$SCM_BRANCH$SCM_STATE$SCM_SUFFIX" + echo -e "$SCM_PREFIX${magenta}$(scm_char) ${blue}$SCM_BRANCH$SCM_STATE$SCM_SUFFIX" } function zuper_scm_prompt_info {