summaryrefslogtreecommitdiff
path: root/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/venv.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/venv.zsh')
m---------dot-oh-my-zsh0
-rw-r--r--dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/venv.zsh45
2 files changed, 0 insertions, 45 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/venv.zsh b/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/venv.zsh
deleted file mode 100644
index e2256541..00000000
--- a/dot-oh-my-zsh/custom/themes/spaceship-prompt/sections/venv.zsh
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Virtualenv
-#
-# virtualenv is a tool to create isolated Python environments.
-# Link: https://virtualenv.pypa.io/
-
-# ------------------------------------------------------------------------------
-# Configuration
-# ------------------------------------------------------------------------------
-
-SPACESHIP_VENV_SHOW="${SPACESHIP_VENV_SHOW=true}"
-SPACESHIP_VENV_PREFIX="${SPACESHIP_VENV_PREFIX="$SPACESHIP_PROMPT_DEFAULT_PREFIX"}"
-SPACESHIP_VENV_SUFFIX="${SPACESHIP_VENV_SUFFIX="$SPACESHIP_PROMPT_DEFAULT_SUFFIX"}"
-SPACESHIP_VENV_SYMBOL="${SPACESHIP_VENV_SYMBOL=""}"
-# The (A) expansion flag creates an array, the '=' activates word splitting
-SPACESHIP_VENV_GENERIC_NAMES="${(A)=SPACESHIP_VENV_GENERIC_NAMES=virtualenv venv .venv}"
-SPACESHIP_VENV_COLOR="${SPACESHIP_VENV_COLOR="blue"}"
-
-# ------------------------------------------------------------------------------
-# Section
-# ------------------------------------------------------------------------------
-
-# Show current virtual environment (Python).
-spaceship_venv() {
- [[ $SPACESHIP_VENV_SHOW == false ]] && return
-
- # Check if the current directory running via Virtualenv
- [ -n "$VIRTUAL_ENV" ] || return
-
- local 'venv'
-
- if [[ "${SPACESHIP_VENV_GENERIC_NAMES[(i)$VIRTUAL_ENV:t]}" -le \
- "${#SPACESHIP_VENV_GENERIC_NAMES}" ]]
- then
- venv="$VIRTUAL_ENV:h:t"
- else
- venv="$VIRTUAL_ENV:t"
- fi
-
-spaceship::section \
- "$SPACESHIP_VENV_COLOR" \
- "$SPACESHIP_VENV_PREFIX" \
- "${SPACESHIP_VENV_SYMBOL}${venv}" \
- "$SPACESHIP_VENV_SUFFIX"
-}