summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--themes/pygmalion-virtualenv.zsh-theme11
-rw-r--r--themes/pygmalion.zsh-theme6
-rw-r--r--themes/refined.zsh-theme1
3 files changed, 10 insertions, 8 deletions
diff --git a/themes/pygmalion-virtualenv.zsh-theme b/themes/pygmalion-virtualenv.zsh-theme
index 47b0b4fb1..c2ab7f4e6 100644
--- a/themes/pygmalion-virtualenv.zsh-theme
+++ b/themes/pygmalion-virtualenv.zsh-theme
@@ -35,19 +35,20 @@ prompt_setup_pygmalion(){
}
prompt_pygmalion_precmd(){
- setopt localoptions extendedglob
+ setopt localoptions nopromptsubst extendedglob
local gitinfo=$(git_prompt_info)
local gitinfo_nocolor=${gitinfo//\%\{[^\}]##\}}
- local exp_nocolor="$(print -P \"$base_prompt_nocolor$gitinfo_nocolor$post_prompt_nocolor\")"
+ local exp_nocolor="$(print -P \"${base_prompt_nocolor}${gitinfo_nocolor}${post_prompt_nocolor}\")"
local prompt_length=${#exp_nocolor}
+ # add new line on prompt longer than 40 characters
local nl=""
-
if [[ $prompt_length -gt 40 ]]; then
- nl=$'\n%{\r%}';
+ nl=$'\n%{\r%}'
fi
- PROMPT="$base_prompt$gitinfo$nl$post_prompt"
+
+ PROMPT="${base_prompt}\$(git_prompt_info)${nl}${post_prompt}"
}
prompt_setup_pygmalion
diff --git a/themes/pygmalion.zsh-theme b/themes/pygmalion.zsh-theme
index b13adfd5f..be9ca3889 100644
--- a/themes/pygmalion.zsh-theme
+++ b/themes/pygmalion.zsh-theme
@@ -19,14 +19,14 @@ prompt_setup_pygmalion(){
}
prompt_pygmalion_precmd(){
- setopt localoptions extendedglob
+ setopt localoptions nopromptsubst extendedglob
local gitinfo=$(git_prompt_info)
local gitinfo_nocolor=${gitinfo//\%\{[^\}]##\}}
- local exp_nocolor="$(print -P \"$base_prompt_nocolor$gitinfo_nocolor$post_prompt_nocolor\")"
+ local exp_nocolor="$(print -P \"${base_prompt_nocolor}${gitinfo_nocolor}${post_prompt_nocolor}\")"
local prompt_length=${#exp_nocolor}
- PROMPT="${base_prompt}${gitinfo}${post_prompt}"
+ PROMPT="${base_prompt}\$(git_prompt_info)${post_prompt}"
}
prompt_setup_pygmalion
diff --git a/themes/refined.zsh-theme b/themes/refined.zsh-theme
index 5d39bd757..5e2de7a87 100644
--- a/themes/refined.zsh-theme
+++ b/themes/refined.zsh-theme
@@ -70,6 +70,7 @@ preexec() {
# Output additional information about paths, repos and exec time
#
precmd() {
+ setopt localoptions nopromptsubst
vcs_info # Get version control info before we start outputting stuff
print -P "\n$(repo_information) %F{yellow}$(cmd_exec_time)%f"
unset cmd_timestamp #Reset cmd exec time.