Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
functions in prompts evaluated twice?
- X-seq: zsh-users 12704
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh users <zsh-users@xxxxxxxxxx>
- Subject: functions in prompts evaluated twice?
- Date: Sun, 09 Mar 2008 12:56:52 +0100
- Mail-followup-to: zsh users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hey list,
I was about to use the output of a function in my prompt, when I
noticed, that it was evaluated twice.
[snip]
(6006)-~% zsh -f
zsh% setopt promptsubst
zsh% foo () { sleep 2 ; }
zsh% PROMPT='$(foo)%# '
% set -x
+zsh:1> foo
+foo:0> sleep 2
+zsh:1> foo
+foo:0> sleep 2
%
[snap]
Is that supposed to be the way it is or is that a bug?
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author