`~/.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
'Setting > Ubuntu' 카테고리의 다른 글
| 터미널 에뮬레이터 비교 (Ghostty, WezTerm, Kitty, Alacritty, Foot, Warp) (2) | 2025.03.05 |
|---|---|
| 멀티 부팅 환경에서 시간 동기화 문제 해결 (0) | 2025.03.05 |
| Zsh + Prezto + Nerd Font 설정 (0) | 2025.03.05 |
| 우분투 저장소 (repository) kakao mirror로 변경하기 (0) | 2025.03.05 |
| Grub 부팅 순서 설정 및 멀티 부팅 선택 (부제: 우분투에서 윈도우로 재부팅하기) (0) | 2025.03.04 |