fixes hg vars
parent
5ad4a525b9
commit
300f6a4f98
|
|
@ -1,5 +1,7 @@
|
||||||
# Bash it
|
# Bash it
|
||||||
|
|
||||||
|
My personal modifications :)
|
||||||
|
|
||||||
**Bash it** is a mash up of my own bash commands and scripts, other bash stuff I have found.
|
**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). :)
|
(And a shameless ripoff of [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh). :)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,10 @@ SCM_THEME_PROMPT_SUFFIX="${white} ❯"
|
||||||
GIT_SHA_PREFIX="${white} ❮ $(scm_char)${cyan} "
|
GIT_SHA_PREFIX="${white} ❮ $(scm_char)${cyan} "
|
||||||
GIT_SHA_SUFFIX="${white} ❯"
|
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_PREFIX="${white} ❮ ${yellow}"
|
||||||
#HG_SHA_SUFFIX="${reset_color}"
|
#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"
|
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 {
|
function zuper_git_prompt_info {
|
||||||
git_prompt_vars
|
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 {
|
function zuper_scm_prompt_info {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue