3d1719c618e83b03ec7fae023444cdacf729f63a

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

Message

trapd00r: optimize reset of foreground colors

Diff

 1diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme
 2index 51d5387e0333cfe0a981b06d7e14abf850821ef5..a1db9945c0dd60782fee4697b0a97269d39325f0 100755
 3--- a/themes/trapd00r.zsh-theme
 4+++ b/themes/trapd00r.zsh-theme
 5@@ -55,28 +55,29 @@ zsh_path() {
 6     if [[ $c = "/" ]]; then
 7       if [[ $i -eq 1 ]]; then
 8         if [[ $colors -ge 256 ]]; then
 9-          print -Pn '%F{065}%B /%b%f'
10+          print -Pn "%F{065}%B /%b"
11         else
12-          print -Pn '\e[31;1m /%f'
13+          print -Pn "\e[31;1m /"
14         fi
15         (( i++ ))
16         continue
17       fi
18 
19       if [[ $colors -ge 256 ]]; then
20-        print -Pn "${yellow[$i]:-%f} » %f"
21+        print -Pn "${yellow[$i]:-%f} » "
22       else
23-        print -Pn "%F{yellow} > %f"
24+        print -Pn "%F{yellow} > "
25       fi
26       (( i += 6 ))
27     else
28       if [[ $colors -ge 256 ]]; then
29-        print -Pn "%F{065}$c%f"
30+        print -Pn "%F{065}$c"
31       else
32-        print -Pn "%F{blue}$c%f"
33+        print -Pn "%F{blue}$c"
34       fi
35     fi
36   done
37+  print -Pn "%f"
38 }
39 
40