From f52e91e1194e76243eb5f06fc33d9716aee31db0 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sun, 12 Feb 2023 14:33:25 +0900 Subject: [PATCH] themes/agnoster: Support OMB_PROMPT_SHOW_PYTHON_VENV --- themes/agnoster/agnoster.theme.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/themes/agnoster/agnoster.theme.sh b/themes/agnoster/agnoster.theme.sh index 1476e91..c8a3ebf 100644 --- a/themes/agnoster/agnoster.theme.sh +++ b/themes/agnoster/agnoster.theme.sh @@ -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