Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: prompts with newlines get printed twice
- X-seq: zsh-users 16425
- From: Jorge Israel Peña <jorgepblank@xxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: prompts with newlines get printed twice
- Date: Sat, 24 Sep 2011 16:24:36 -0700
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WqYmZka4JFA92gDKHk1EEO2LcNMdu/4PRhyP7CXrRWU=; b=mZ7C2bMJjg+OFwmaSagDUQqG0QPMWZTuUoxTIiAR3FEx2LuAJq2A76Ax9WCdqiLNmB nlAKhrciYT/sPe06S4fEgt5OO/TdRXifrrnt8PUg5NqJ4AaB43n6sWSY9+dFNZVmmJpX 9U2tVtV+NCdOJXGalUk6yjUfSFmTfLoAXoyQs=
- In-reply-to: <CAHYJk3QcrD6gVcGRrVX=n2bL5ZW9F93f39-BYq1a1iyQeZyB1g@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAF3NQe_arDSLBRUEKRfZyDx-2QhsfP63xFYktxKK45a1iA6Eow@mail.gmail.com> <110924112412.ZM24918@torch.brasslantern.com> <CAHYJk3QcrD6gVcGRrVX=n2bL5ZW9F93f39-BYq1a1iyQeZyB1g@mail.gmail.com>
Thanks for the replies. At least I'm glad to know it's not just me, I spent
a few hours on this wondering if it was something I could have screwed up.
So are there any known workarounds? Or is this something that would have to
be fixed in zsh itself?
I found this [ http://www.df.lth.se/~arno/kod/prompt/uberprompt-sh ] which
has a comment near the end:
> Mac OS X Terminal.app and IRIX xwsh seems to send repetetive WINCH to
solaris boxen
Then it includes some code, but I don't know if it's a workaround to this
problem in particular (it seems like it is, includes some sort of trapping
of the WINCHes), much less how to make use of that code. I just figured I'd
post it in case some of you guys could make sense of it (that section in
particular is pretty short).
Hopefully it could provide some information that we can use to fix this, or
at least provide a workaround. The two prompts that pop up are pretty
jarring, somehow.
On Sat, Sep 24, 2011 at 11:31 AM, Mikael Magnusson <mikachu@xxxxxxxxx>wrote:
> On 24 September 2011 20:24, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
> wrote:
> > On Sep 23, 7:52pm, Jorge Israel Pena wrote:
> > }
> > } The problem I'm encountering is that when I create a newline in the
> prompt,
> > } the prompt gets printed twice when I open the terminal.
> >
> > We've been wrestling with this one for a while. The trouble seems to be
> > that Terminal sends extra WINCH (window size change) signals to the
> shell,
> > which causes it to reprint the prompt.
> >
> > Zsh doesn't attempt to perform a cursor-up before printing the prompt, as
> > for command line editing purposes it only keeps track of the appearance
> of
> > the final line.
>
> I'm seeing some strange behaviour here, when I resize after setting
> PS1='%D{%s} hello
> there '
> I do get the first line twice, but subsequent resizes properly redraws
> both lines in place, updating the time too. Pressing enter then causes
> the next resize to double the first line and then subsequent ones work
> again.
>
> --
> Mikael Magnusson
>
--
- Jorge Israel Peña
Messages sorted by:
Reverse Date,
Date,
Thread,
Author