`~/.zshrc` 에 추가
zsh_virtualenv_prompt() {
# If not in a virtualenv, print nothing
[[ "$VIRTUAL_ENV" == "" ]] && return
# Distinguish between the shell where the virtualenv was activated
# and its children
local venv_name="${VIRTUAL_ENV##*/}"
if typeset -f deactivate >/dev/null; then
echo "[%F{green}${venv_name}%f] "
else
echo "<%F{green}${venv_name}%f> "
fi
}
setopt PROMPT_SUBST PROMPT_PERCENT
# Display a "we are in a virtualenv" indicator that works in child shells too
VIRTUAL_ENV_DISABLE_PROMPT=1
RPS1='$(zsh_virtualenv_prompt)'
https://virtualenvwrapper.readthedocs.io/en/latest/tips.html