From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12527 invoked from network); 1 Mar 2005 17:40:13 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Mar 2005 17:40:13 -0000 Received: (qmail 33479 invoked from network); 1 Mar 2005 17:40:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Mar 2005 17:40:07 -0000 Received: (qmail 10898 invoked by alias); 1 Mar 2005 17:40:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20901 Received: (qmail 10877 invoked from network); 1 Mar 2005 17:39:59 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 1 Mar 2005 17:39:59 -0000 Received: (qmail 32668 invoked from network); 1 Mar 2005 17:39:59 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 1 Mar 2005 17:39:54 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0ICO00CI3P2GA1K0@vms042.mailsrvcs.net> for zsh-workers@sunsite.dk; Tue, 01 Mar 2005 11:39:53 -0600 (CST) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j21Hdpdo027938 for ; Tue, 01 Mar 2005 09:39:51 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j21Hdp5c027937 for zsh-workers@sunsite.dk; Tue, 01 Mar 2005 09:39:51 -0800 Date: Tue, 01 Mar 2005 17:39:51 +0000 From: Bart Schaefer Subject: Re: promptcr workaround In-reply-to: To: zsh-workers@sunsite.dk Message-id: <1050301173951.ZM27936@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: Comments: In reply to Karl Chen "promptcr workaround" (Mar 1, 12:17am) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Mar 1, 12:17am, Karl Chen wrote: } } Here's a way to simulate adding the \n only when necessary: } } function precmd { } echo -n ${(l:$COLUMNS:::)} } } } } This prints $COLUMNS spaces. The only trouble with this is that it's really annoying when doing cut-and-paste, because triple-click to select the whole line will select all those trailing spaces as well. See also http://www.zsh.org/mla/workers/2004/msg01117.html or http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=20472 (the latter gets an internal server error as of this writing, but is otherwise theoretically more stable than the former).