mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
New Functionnality: + plugins/virtualenv/... plugin: stop virtualenv from prepending '(virtualenv_name)' to the prompt + lib/virtualenv.zsh: provide a virtualenv_prompt_info function that behaves similarly to lib/git.zsh's git_prompt_info Uses: + ZSH_THEME_VIRTUALENV_PROMPT_PREFIX + ZSH_THEME_VIRTUALENV_PROMPT_SUFFIX These variables are added to the output of virtualenv_prompt_info
5 lines
281 B
Bash
5 lines
281 B
Bash
# get the name of the virtualenv we are on
|
|
function virtualenv_prompt_info() {
|
|
active_virtualenv=$(basename $VIRTUAL_ENV 2> /dev/null) || return
|
|
[[ -n active_virtualenv ]] && echo "$ZSH_THEME_VIRTUALENV_PROMPT_PREFIX$active_virtualenv$ZSH_THEME_VIRTUALENV_PROMPT_SUFFIX"
|
|
}
|