From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3720 invoked by alias); 25 Sep 2011 22:13:42 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16429 Received: (qmail 11628 invoked from network); 25 Sep 2011 22:13:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110925151330.ZM20235@torch.brasslantern.com> Date: Sun, 25 Sep 2011 15:13:30 -0700 In-reply-to: Comments: In reply to Jorge Israel Pena "Re: prompts with newlines get printed twice" (Sep 24, 4:24pm) References: <110924112412.ZM24918@torch.brasslantern.com> In-reply-to: Comments: In reply to Jorge Israel Pena "Re: prompts with newlines get printed twice" (Sep 24, 5:14pm) X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: prompts with newlines get printed twice MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Sep 24, 4:24pm, Jorge Israel Pena wrote: } } So are there any known workarounds? Or is this something that would } have to be fixed in zsh itself? Until a few minutes ago I'd have said it was something that needed to be fixed in Terminal, but I may have found a zsh bug that's behind it all. I've sent a possible fix to zsh-workers for discussion. On Sep 24, 5:14pm, Jorge Israel Pena wrote: } } Hey guys. I have extracted what I felt were the relevant parts from my } previously posted link. Like I said, I am no zsh expert (In fact I'm } completely new to it) so I don't know if this is right or if there are } more efficient, better ways of doing this. } } Source: https://gist.github.com/1240023 } } I tested it various times and it seems to be working perfectly. I don't find any evidence that this helps except possibly by waiting to change the prompt until the first time the WINCH is received, which would avoid the startup-time double prompt. I still get the prompt printed multiple times if I later resize the window. However, trap 'tput cuu1' WINCH (that is, move up one line on each WINCH signal) might work around it for you. If your prompt has more than two lines, you'll need to move up one less than the number of lines in the prompt.