On an rxvt-clone (I'm using rxvt-unicode
but it seems to happen on plain, old rxvt
as well), the sequence of characters %F
seems to have some sort of special meaning (as do a few others, such as %S
). In particular, I get the following:
% date +%F
38;5;0m2011-04-02
% date +%F--%H.%M.%S
38;5;0m--.Hostname.2011-04-02--22.25.59
with the text after the m
being in some dark almost-black colour. Due to my colour scheme (mauve text on a dark blue polka dot background), this is almost unreadable.
What is this, and more importantly, how do I get it to stop?
To show why it is particularly annoying, my lecture documents have the date as part of their name. It is therefore quite convenient to be able to write:
xelatex lecture.beamer.$(date +%F).tex
since I can store that in my history and recall it with a few judicious TABs. However, the ensuing output is all the inverse of a whiter shade of pale, making it hard to see if there's an error.
In case it makes a difference, my shell is zsh
.
Best Answer
In one of your comments, you mentioned using
zsh
with apreexec
function that callsprint -P $2
.In
zsh
,print -P
accepts these format characters:%F
means set the foreground color%S
means set the standout attributeSee zsh prompt expansion for the full list.
So it's probably best to remove the
-P
flag from your call toprint
inpreexec
.One way to get the same effect: