From 6a39971919f3b6b522bd3e38e8f6cc820d73bb5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDilvinas=20Valinskas?= Date: Sat, 1 Feb 2014 18:05:32 +0200 Subject: [PATCH 1/2] Fix spectrum_ls() to show colors --- lib/spectrum.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh index 166c942fb..a4171589f 100644 --- a/lib/spectrum.zsh +++ b/lib/spectrum.zsh @@ -22,7 +22,7 @@ done # Show all 256 colors with color number function spectrum_ls() { for code in {000..255}; do - print -P -- "$code: %F{$code}Test%f" + print -P -- "$code: $FG[$code]Test%{$reset_color%}" done } From 2e389122d89eab37d46b487a7808c1da0202efdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Thu, 12 Dec 2013 23:27:22 +0100 Subject: [PATCH 2/2] Avoid evaluating special chars in $LINE on title command (fixes #2234) --- lib/termsupport.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 80319e1a8..6eba8f69a 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -27,9 +27,8 @@ function omz_termsupport_preexec { emulate -L zsh setopt extended_glob local CMD=${1[(wr)^(*=*|sudo|ssh|rake|-*)]} #cmd name only, or if this is sudo or ssh, the next cmd - local LINE="${2:gs/$/\\$}" - LINE="${LINE:gs/%/%%}" - title "$CMD" "%100>...>$LINE%<<" + local LINE="${2}" + title "$CMD" '%100>...>$LINE%<<' } autoload -U add-zsh-hook