diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2014-01-24 12:39:58 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2014-01-24 12:39:58 +0100 |
commit | 1040af12c70ffd923e4dd1989a660c26e91e103e (patch) | |
tree | ba064831e575ad8e3faa11fb78d24df113202ce9 /12_Prompts.zsh | |
parent | b68e23cd00915e94389fbe5f56508113655a1880 (diff) | |
parent | a619da8a796876ac62857f54f41f444e2e12d087 (diff) |
Merge branch 'master' into HackyGit
Diffstat (limited to '12_Prompts.zsh')
-rw-r--r-- | 12_Prompts.zsh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh index f3139af..d49b947 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -229,10 +229,13 @@ __subvcsbranches () { # Get recursive submodules statuses for SUBMODULE in $(git config --get zsh.recurse-dirs) do - if [ -d $(dirname $GIT_DIR)/$SUBMODULE/.git -o -d $GIT_DIR/modules/$SUBMODULE ] + _sub=$(dirname $GIT_DIR)/$SUBMODULE/.git + [ ! -d $_sub ] && _sub=$(dirname $GIT_DIR)/modules/$SUBMODULE + if [ -d $_sub ] then GITBRANCH+=${GITBRANCH:+$(tput cuf1)} - GITBRANCH+=$C_$_prompt_colors[bar]$_C"[%{%B%}$SUBMODULE%{%b%}:" + _name=$(GIT_DIR=$_sub git config --get zsh.pretty-name ) + GITBRANCH+=$C_$_prompt_colors[bar]$_C"[%{%B%}"${_name:-$SUBMODULE}"%{%b%}:" GITBRANCH+=$(__get_git_fullstatus $(dirname $GIT_DIR)/$SUBMODULE) GITBRANCH+=$C_$_prompt_colors[bar]$_C"]" fi |