diff options
author | Dennis Eriksen <d@ennis.no> | 2023-10-22 13:15:58 +0300 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-10-22 13:15:58 +0300 |
commit | 65e9c940b76a4e9bfe2a30b7873c74c687d40f63 (patch) | |
tree | 64e6cbffe21dcf5124de9137b6894224b7376b89 | |
parent | fix bug where dir was shown wrongly (diff) | |
download | adam3-65e9c940b76a4e9bfe2a30b7873c74c687d40f63.tar.gz |
move venv after working dir and before git
placing venv-info makes more sense with git-info
-rw-r--r-- | prompt_adam3_setup | 11 |
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 |