Add python venvs to prompt
This commit is contained in:
parent
dbee7dfed3
commit
6d287ef6d0
|
@ -97,9 +97,11 @@ function setprompt() {
|
|||
[[ -w $PWD ]] && infoline+=( ${pathcolor} ) || infoline+=( ${ropathcolor} )
|
||||
infoline+=( "${PVPREFIX} %(5~|%-1~/.../|)%3~ ${PVSUFFIX}${rpscolor}${PR_HBAR}" )
|
||||
|
||||
[[ -n "$VIRTUAL_ENV" ]] && infoline+=( "${usercolor}${PVPREFIX}venv: ${VIRTUAL_ENV:t}${PVSUFFIX}${rpscolor}" )
|
||||
[[ -n "$CONDA_DEFAULT_ENV" ]] && infoline+=( "${usercolor}${PVPREFIX}conda: ${CONDA_DEFAULT_ENV}${PVSUFFIX}${rpscolor}" )
|
||||
|
||||
# Username & host
|
||||
infoline+=( "%(1j.${PVPREFIX} ${gitdirty}Jobs: %j${rpscolor} ${PVSUFFIX}.)" )
|
||||
mod_loaded todo && infoline+=( "$(todo_to_read_info)" )
|
||||
infoline+=( "${PVPREFIX} ${usercolor}%n${reset}@${hostcolor}%m${rpscolor} ${PVSUFFIX}" )
|
||||
|
||||
i_width=${(S)infoline//\%\{*\%\}} # search-and-replace color escapes
|
||||
|
|
Loading…
Reference in a new issue