From: Josselin Noirel <noirel@clipper.ens.fr>
To: zsh-workers@sunsite.dk
Subject: precmd() affecting the "r" command output
Date: Sun, 12 Jun 2005 19:05:29 +0200 [thread overview]
Message-ID: <20050612170529.GA10725@clipper.ens.fr> (raw)
Hi,
I'm using the precmd() special function to print the current directory
and the hostname in the title bar of my xterms. But doing this, the
output of the r command (executing again the last command) is affected
in a unexpected and unwanted way - I guess.
1> which precmd
precmd not found
2> locate foobar
/usr/TeX/texmf-dist/doc/latex/examdesign/foobar.tex
3> less `r`
locate foobar
4> precmd () {
function> print -Pn "\e]0;[ %n@%m: %~ ]\a"
function> }
5> locate foobar
/usr/TeX/texmf-dist/doc/latex/examdesign/foobar.tex
6> less `r`
locate foobar
test@matamore:: No such file or directory
/home/noirel is a directory
]/usr/TeX/texmf-dist/doc/latex/examdesign/foobar.tex: No such file or
directory
7>
precmd() is supposed to be executed once before each prompt (according
to the man page) but here it is executed one more time, when "r" is
executed. I think that either the behaviour or the man page is
wrong and should therefore be corrected.
Thank you for your time (and for zsh of course),
--
Josselin Noirel
next reply other threads:[~2005-06-12 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-12 17:05 Josselin Noirel [this message]
2005-06-12 19:39 ` Bart Schaefer
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=20050612170529.GA10725@clipper.ens.fr \
--to=noirel@clipper.ens.fr \
--cc=zsh-workers@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).