e59cc94805ebe76b0eb57de0b84e403583ebd4db

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

themes: fix prompt verbosity on window resize

%_ is a prompt expansion sequence that expands to the status of the parser.
This means that on window resize, the status of the execution of the
window resize hook (TRAPWINCH) would be displayed while reloading the
prompt line. This looked like cmdand cursh$ or then$ depending on the
body of the TRAPWINCH function.

Fixes #7262

Diff

 1diff --git a/themes/dst.zsh-theme b/themes/dst.zsh-theme
 2index 3e2539d57592937a074e0c01e68bd76cf0d539d2..6b2f8767d43733578c0ad0fb497ffdf3e8293c26 100644
 3--- a/themes/dst.zsh-theme
 4+++ b/themes/dst.zsh-theme
 5@@ -11,6 +11,6 @@ function prompt_char {
 6 PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
 7 )
 8 %{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)
 9-%_ $(prompt_char) '
10+$(prompt_char) '
11 
12 RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
13diff --git a/themes/gentoo.zsh-theme b/themes/gentoo.zsh-theme
14index ee205d248c2aa1888062dd402c2e558612e2fc1f..5f2427c7ae736b67e873a02d44379ed5c9523302 100644
15--- a/themes/gentoo.zsh-theme
16+++ b/themes/gentoo.zsh-theme
17@@ -2,7 +2,7 @@ function prompt_char {
18 	if [ $UID -eq 0 ]; then echo "#"; else echo $; fi
19 }
20 
21-PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} '
22+PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)$(prompt_char)%{$reset_color%} '
23 
24 ZSH_THEME_GIT_PROMPT_PREFIX="("
25 ZSH_THEME_GIT_PROMPT_SUFFIX=") "
26diff --git a/themes/tjkirch.zsh-theme b/themes/tjkirch.zsh-theme
27index 446cde724e7e66fa40c754b47af7ab6adc6ec1c4..c516098602459b5bd9aa6718173b7ccdffe4780d 100644
28--- a/themes/tjkirch.zsh-theme
29+++ b/themes/tjkirch.zsh-theme
30@@ -10,6 +10,6 @@ function prompt_char {
31 PROMPT='%(?, ,%{$fg[red]%}FAIL: $?%{$reset_color%}
32 )
33 %{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info)
34-%_$(prompt_char) '
35+$(prompt_char) '
36 
37 RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
38diff --git a/themes/tjkirch_mod.zsh-theme b/themes/tjkirch_mod.zsh-theme
39index 1b206a7e1f85e4a0b0d6fa208914a8f2c62dda3c..2dd060ea1cbe9a575d715594e4202ca1008a3a04 100644
40--- a/themes/tjkirch_mod.zsh-theme
41+++ b/themes/tjkirch_mod.zsh-theme
42@@ -8,6 +8,6 @@ function prompt_char {
43 }
44 
45 PROMPT='%(?,,%{$fg[red]%}FAIL: $?%{$reset_color%}
46-)%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) %_$(prompt_char) '
47+)%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) $(prompt_char) '
48 
49 RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'