From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14698 invoked from network); 11 Jul 2004 05:57:08 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 11 Jul 2004 05:57:08 -0000 Received: (qmail 28994 invoked from network); 11 Jul 2004 05:59:16 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Jul 2004 05:59:16 -0000 Received: (qmail 18205 invoked by alias); 11 Jul 2004 05:56:29 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7676 Received: (qmail 18194 invoked from network); 11 Jul 2004 05:56:29 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 11 Jul 2004 05:56:29 -0000 Received: (qmail 28134 invoked from network); 11 Jul 2004 05:58:55 -0000 Received: from unknown (HELO moonbase.zanshin.com) (@167.160.213.139) by a.mx.sunsite.dk with SMTP; 11 Jul 2004 05:58:42 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i6B5uDej022667 for ; Sat, 10 Jul 2004 22:56:13 -0700 Date: Sat, 10 Jul 2004 22:56:13 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: zsh-users@sunsite.dk Subject: Re: terminal resizing and prompt problem In-Reply-To: <20040711002054.3d469d20@localhost> Message-ID: References: <20040710172553.168f14b9@localhost> <20040711002054.3d469d20@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Sun, 11 Jul 2004, Nathan Sommer wrote: > Am I correct in concluding from your reply that it is impossible to have > a multi-line zsh prompt and not get any extra lines after resizing a > terminal? It's impossible to have a multi-line value of $PS1 withoug getting extra lines after resizing. However, it occurs to me that you can make it look pretty much the same by printing the first line yourself in the precmd function and having the second line as the value of $PS1. E.g. precmd() { print -rP $'\e[1;32m[%d]\e[0m' } PS1=$'%{\e[1;34m%}[%T]%{\e[1;32m%}%%%{\e[0m%} ' Incidentally, I also use fvwm, but I almost never resize a window by dragging. I have a title-bar button using a function for "Maximize 0 100" and simply toggle back and forth between having the window be the full height of the display, and whatever height it started at. What's the point of mucking around with anything in between?