* Re: Outputting colored zsh prompts from an external script
[not found] <20130324192345.GA20437__22562.4022576541$1364153239$gmane$org@kaeru>
@ 2013-03-24 21:30 ` Christian Neukirchen
0 siblings, 0 replies; 2+ messages in thread
From: Christian Neukirchen @ 2013-03-24 21:30 UTC (permalink / raw)
To: zsh-workers
seanh <snhmnd@gmail.com> writes:
> I also tried getting zshprompt.py to print out zsh color codes like
> %{$fg[red]%}FOO%{$reset_color%}, but zsh doesn't seem to interpret these
> when they're printed by zshprompt.py, it just prints them out into the
> prompts literally. I tried various zsh options with this, such as
> setopt promptpercent and setopt promptsubst, and tried various other ways of
> calling the Python script, such as within double-quotes or back-ticks
> instead of single-quotes, or without any quotes at all. Nothing worked.
This works here (note how it gets executed every time):
setopt promptsubst
PROMPT+='$(date +"%%F{red}%H:%M:%S%%f") '
Alternatively, you could try setting the prompt in a precmd().
But I expect terrible performance from running a python command before
every prompt. It does not seem very hard to port that python code there
to plain zsh.
Have fun,
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <20130324192345.GA20437@kaeru>]
end of thread, other threads:[~2013-03-25 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20130324192345.GA20437__22562.4022576541$1364153239$gmane$org@kaeru>
2013-03-24 21:30 ` Outputting colored zsh prompts from an external script Christian Neukirchen
[not found] <20130324192345.GA20437@kaeru>
[not found] ` <871ub431wq.fsf@gmail.com>
[not found] ` <CAMvu5b+RCigGy-rjtyQB_H_vYF1MPC4PjEW0NBgFYrJEYnViZw__868.462134576653$1364217014$gmane$org@mail.gmail.com>
2013-03-25 15:42 ` Christian Neukirchen
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).