From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh users <zsh-users@sunsite.dk>
Subject: functions in prompts evaluated twice?
Date: Sun, 09 Mar 2008 12:56:52 +0100 [thread overview]
Message-ID: <20080309115652.GP30518@fsst.voodoo.lan> (raw)
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
reply other threads:[~2008-03-09 12:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080309115652.GP30518@fsst.voodoo.lan \
--to=ft@bewatermyfriend.org \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).