themes/agnoster: Support OMB_PROMPT_SHOW_PYTHON_VENV

This commit is contained in:
Koichi Murase
2023-02-12 14:33:25 +09:00
parent cf2a130624
commit f52e91e119

View File

@@ -67,6 +67,11 @@
# 'brew install bash' will set you free
PROMPT_DIRTRIM=2 # bash4 and above
######################################################################
## Configurations in Oh My Bash
OMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}
######################################################################
DEBUG=0
function debug {
@@ -415,8 +420,10 @@ function build_prompt {
prompt_status
#[[ -z ${AG_NO_HIST+x} ]] && prompt_histdt
[[ -z ${AG_NO_CONTEXT+x} ]] && prompt_context
prompt_virtualenv
prompt_conda_env
if [[ ${OMB_PROMPT_SHOW_PYTHON_VENV-} ]]; then
prompt_virtualenv
prompt_conda_env
fi
prompt_dir
prompt_git
prompt_end