summaryrefslogtreecommitdiff
path: root/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_status.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_status.zsh')
m---------dot-oh-my-zsh0
-rw-r--r--dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_status.zsh51
2 files changed, 0 insertions, 51 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_status.zsh b/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_status.zsh
deleted file mode 100644
index f4b259d0..00000000
--- a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/hg_status.zsh
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Mercurial (hg) status
-#
-# Show Mercurial status
-
-# ------------------------------------------------------------------------------
-# Configuration
-# ------------------------------------------------------------------------------
-
-SPACESHIP_HG_STATUS_SHOW="${SPACESHIP_HG_STATUS_SHOW=true}"
-SPACESHIP_HG_STATUS_PREFIX="${SPACESHIP_HG_STATUS_PREFIX=" ["}"
-SPACESHIP_HG_STATUS_SUFFIX="${SPACESHIP_HG_STATUS_SUFFIX="]"}"
-SPACESHIP_HG_STATUS_COLOR="${SPACESHIP_HG_STATUS_COLOR="red"}"
-SPACESHIP_HG_STATUS_UNTRACKED="${SPACESHIP_HG_STATUS_UNTRACKED="?"}"
-SPACESHIP_HG_STATUS_ADDED="${SPACESHIP_HG_STATUS_ADDED="+"}"
-SPACESHIP_HG_STATUS_MODIFIED="${SPACESHIP_HG_STATUD_MODIFIED="!"}"
-SPACESHIP_HG_STATUS_DELETED="${SPACESHIP_HG_STATUS_DELETED="✘"}"
-
-# ------------------------------------------------------------------------------
-# Section
-# ------------------------------------------------------------------------------
-
-# Check if current dir is a hg repo and show hg status as indicators
-spaceship_hg_status() {
- [[ $SPACESHIP_HG_STATUS_SHOW == false ]] && return
-
- spaceship::is_hg || return
-
- local INDEX=$(hg status 2>/dev/null) hg_status=""
-
- # Indicators are suffixed instead of prefixed to each other to
- # provide uniform view across git and mercurial indicators
- if $(echo "$INDEX" | grep -E '^\? ' &> /dev/null); then
- hg_status="$SPACESHIP_HG_STATUS_UNTRACKED$hg_status"
- fi
- if $(echo "$INDEX" | grep -E '^A ' &> /dev/null); then
- hg_status="$SPACESHIP_HG_STATUS_ADDED$hg_status"
- fi
- if $(echo "$INDEX" | grep -E '^M ' &> /dev/null); then
- hg_status="$SPACESHIP_HG_STATUS_MODIFIED$hg_status"
- fi
- if $(echo "$INDEX" | grep -E '^(R|!)' &> /dev/null); then
- hg_status="$SPACESHIP_HG_STATUS_DELETED$hg_status"
- fi
-
- if [[ -n $hg_status ]]; then
- spaceship::section \
- "$SPACESHIP_HG_STATUS_COLOR" \
- "$SPACESHIP_HG_STATUS_PREFIX"$hg_status"$SPACESHIP_HG_STATUS_SUFFIX"
- fi
-}