mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Merge 852c248de5 into 80a6032596
This commit is contained in:
commit
85ff293112
2 changed files with 8 additions and 0 deletions
5
lib/virtualenv.zsh
Normal file
5
lib/virtualenv.zsh
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# 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"
|
||||||
|
}
|
||||||
3
plugins/virtualenv/virtualenv.plugin.zsh
Normal file
3
plugins/virtualenv/virtualenv.plugin.zsh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Prevent virtualenv from prepending (virtualenv name) to your prompt
|
||||||
|
# Use virtualenv_prompt_info to add the env to your prompt.
|
||||||
|
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||||
Loading…
Add table
Add a link
Reference in a new issue