Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: New to zsh: zle, regular expressions conditionals, printf, history across shells (Mac OS X, zsh-4.2.7)




On 05.12.2008, at 18:45, Webb Sprague wrote:
3.  I can't figure out printf (or 'print -f').  If I type % printf
"foobar" without any newline, the output disappears.  If I type %
printf 'foo: %s\n' bar, I get "[m' bar:~foo: bar" -- I don't
understand why the special characters, nor where to look to find out
about them.

Perhaps you have a preexec function defined that sets your xterms title using an escape sequence, it probably looks like this:

 print -n "\e]2;$mytitle\C-g"

If that's true you can fix your problem by changing this to:

 print -n "\e]2;${(q)mytitle}\C-g"


Sebastian



Messages sorted by: Reverse Date, Date, Thread, Author