mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-27 08:48:56 +01: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
9 lines
228 B
Bash
9 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
|