Logo
Explore Help
Sign In
shell-user/oh-my-zsh
1
0
Fork 0
You've already forked oh-my-zsh
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-05-11 05:55:17 +00:00
Code Issues Projects Releases Wiki Activity
Files
1f30c1a079cd10030578e38f8562dc5be53d0fd3
oh-my-zsh/plugins/virtualenv/virtualenv.plugin.zsh

8 lines
263 B
Bash
Raw Normal View History

Add very basic virtualenv plugin checks for $VIRTUAL_ENV and provides to basename in a function for the prompt.
2012-07-11 23:40:12 -04:00
function virtualenv_prompt_info(){
Make the virtualenv plugin themable
2013-10-15 14:34:03 +02:00
[[ -n ${VIRTUAL_ENV} ]] || return
fix(virtualenv): quote % in `virtualenv_prompt_info`
2021-12-26 20:43:54 +01:00
echo "${ZSH_THEME_VIRTUALENV_PREFIX=[}${VIRTUAL_ENV:t:gs/%/%%}${ZSH_THEME_VIRTUALENV_SUFFIX=]}"
Add very basic virtualenv plugin checks for $VIRTUAL_ENV and provides to basename in a function for the prompt.
2012-07-11 23:40:12 -04:00
}
virtualenv cleanup: replaces subshell with prompt expansion. * :t parameter expansion returns the last portion of the path, equivalent to basename. I <3 zsh. * adds comments for the VIRTUAL_ENV_DISABLE_PROMPT, used by virtual_env activate See also: http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion
2013-06-08 10:02:32 -07:00
# disables prompt mangling in virtual_env/bin/activate
Add very basic virtualenv plugin checks for $VIRTUAL_ENV and provides to basename in a function for the prompt.
2012-07-11 23:40:12 -04:00
export VIRTUAL_ENV_DISABLE_PROMPT=1
Reference in New Issue Copy Permalink
Powered by Gitea Page: 484ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API