浏览代码

trapd00r: optimize reset of foreground colors

Marc Cornellà 5 年之前
父节点
当前提交
3d1719c618
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      themes/trapd00r.zsh-theme

+ 7 - 6
themes/trapd00r.zsh-theme

@@ -55,28 +55,29 @@ zsh_path() {
     if [[ $c = "/" ]]; then
       if [[ $i -eq 1 ]]; then
         if [[ $colors -ge 256 ]]; then
-          print -Pn '%F{065}%B /%b%f'
+          print -Pn "%F{065}%B /%b"
         else
-          print -Pn '\e[31;1m /%f'
+          print -Pn "\e[31;1m /"
         fi
         (( i++ ))
         continue
       fi
 
       if [[ $colors -ge 256 ]]; then
-        print -Pn "${yellow[$i]:-%f} » %f"
+        print -Pn "${yellow[$i]:-%f} » "
       else
-        print -Pn "%F{yellow} > %f"
+        print -Pn "%F{yellow} > "
       fi
       (( i += 6 ))
     else
       if [[ $colors -ge 256 ]]; then
-        print -Pn "%F{065}$c%f"
+        print -Pn "%F{065}$c"
       else
-        print -Pn "%F{blue}$c%f"
+        print -Pn "%F{blue}$c"
       fi
     fi
   done
+  print -Pn "%f"
 }