aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/prompt_adam3_setup
diff options
context:
space:
mode:
Diffstat (limited to 'prompt_adam3_setup')
-rw-r--r--prompt_adam3_setup11
1 files changed, 6 insertions, 5 deletions
diff --git a/prompt_adam3_setup b/prompt_adam3_setup
index 6667d40..8cb8afa 100644
--- a/prompt_adam3_setup
+++ b/prompt_adam3_setup
@@ -169,11 +169,11 @@ prompt_adam3_precmd () {
# vcs
vcs_info #$vcs_info_msg_0_
- local prom preprom
- (( ${+VIRTUAL_ENV} )) && preprom="${PROMPT_ADAM3_VENV/SUBSTITUTE/${VIRTUAL_ENV:t}} "
- preprom+=${PROMPT_ADAM3_PS1}
- prom=${preprom}
+ local prom venv_info
+ (( ${+VIRTUAL_ENV} )) && venv_info="${PROMPT_ADAM3_VENV/SUBSTITUTE/${VIRTUAL_ENV:t}} "
+ prom=${PROMPT_ADAM3_PS1}
prom+=$PROMPT_ADAM3_SLM_DIR
+ prom+=$venv_info
prom+=$vcs_info_msg_0_
prom+=$PROMPT_ADAM3_PROMPTCHAR
@@ -184,7 +184,7 @@ prompt_adam3_precmd () {
# If the prompt is over half the terminal, we go into multiline-mode.
if (( prompt_length > ( COLUMNS / 2 ) )); then
- prom=$preprom # reset prompt
+ prom=${PROMPT_ADAM3_PS1} # reset prompt
prom+=$PROMPT_ADAM3_DLM_DIR # double-line-mode dir
# We need to recalculate prompt_length to know where to put time
@@ -195,6 +195,7 @@ prompt_adam3_precmd () {
# Add time. Left-pad with spaces.
prom+=${(l:$timepadding:)PROMPT_ADAM3_RPS1}
prom+=$'\n' # newline
+ prom+=$venv_info # virtualenv info
prom+=$vcs_info_msg_0_ # vcs
prom+=$PROMPT_ADAM3_PROMPTCHAR # promptchar
RPS1= # RPS1 does not support multiline, so reset it when we're in multiline