mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-24 14:50:07 +00:00
894e1caa0a
* :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
8 lines
228 B
Bash
8 lines
228 B
Bash
function virtualenv_prompt_info(){
|
|
if [[ -n $VIRTUAL_ENV ]]; then
|
|
printf "%s[%s] " "%{${fg[yellow]}%}" ${${VIRTUAL_ENV}:t}
|
|
fi
|
|
}
|
|
|
|
# disables prompt mangling in virtual_env/bin/activate
|
|
export VIRTUAL_ENV_DISABLE_PROMPT=1
|