diff options
Diffstat (limited to 'dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_branch.zsh')
| m--------- | dot-oh-my-zsh | 0 | ||||
| -rw-r--r-- | dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_branch.zsh | 33 |
2 files changed, 0 insertions, 33 deletions
diff --git a/dot-oh-my-zsh b/dot-oh-my-zsh new file mode 160000 +Subproject 6fe84bf5c82da7b1f6d7c5ec3e5c447721ac8ce diff --git a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_branch.zsh b/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_branch.zsh deleted file mode 100644 index 941337fe..00000000 --- a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_branch.zsh +++ /dev/null @@ -1,33 +0,0 @@ -# -# Mercurial (hg) branch -# -# Show current Mercurial branch - -# ------------------------------------------------------------------------------ -# Configuration -# ------------------------------------------------------------------------------ - -SPACESHIP_HG_BRANCH_SHOW="${SPACESHIP_HG_BRANCH_SHOW=true}" -SPACESHIP_HG_BRANCH_PREFIX="${SPACESHIP_HG_BRANCH_PREFIX="$SPACESHIP_HG_SYMBOL"}" -SPACESHIP_HG_BRANCH_SUFFIX="${SPACESHIP_HG_BRANCH_SUFFIX=""}" -SPACESHIP_HG_BRANCH_COLOR="${SPACESHIP_HG_BRANCH_COLOR="magenta"}" - -# ------------------------------------------------------------------------------ -# Section -# ------------------------------------------------------------------------------ - -spaceship_hg_branch() { - [[ $SPACESHIP_HG_BRANCH_SHOW == false ]] && return - - spaceship::is_hg || return - - local hg_info=$(hg log -r . --template '{activebookmark}') - - if [[ -z $hg_info ]]; then - hg_info=$(hg branch) - fi - - spaceship::section \ - "$SPACESHIP_HG_BRANCH_COLOR" \ - "$SPACESHIP_HG_BRANCH_PREFIX"$hg_info"$SPACESHIP_HG_BRANCH_SUFFIX" -} |
