From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16352 invoked from network); 23 Jul 2005 17:20:10 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Jul 2005 17:20:10 -0000 Received: (qmail 79884 invoked from network); 23 Jul 2005 17:20:04 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Jul 2005 17:20:04 -0000 Received: (qmail 21379 invoked by alias); 23 Jul 2005 17:20:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21508 Received: (qmail 21362 invoked from network); 23 Jul 2005 17:20:00 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Jul 2005 17:20:00 -0000 Received: (qmail 79358 invoked from network); 23 Jul 2005 17:20:00 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 23 Jul 2005 17:19:56 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 9780B65EC; Sat, 23 Jul 2005 10:19:55 -0700 (PDT) Date: Sat, 23 Jul 2005 10:19:55 -0700 From: Wayne Davison To: Bart Schaefer Cc: Zsh hackers list Subject: Re: PATCH: PROMPT_SP Message-ID: <20050723171955.GC16571@blorf.net> References: <20050714182506.GB11296@blorf.net> <20050715175551.GA29713@blorf.net> <1050716160634.ZM31049@candle.brasslantern.com> <20050716195612.GA11575@blorf.net> <200507181032.j6IAWB4q022520@news01.csr.com> <20050718181330.GA19066@blorf.net> <1050723135554.ZM19813@candle.brasslantern.com> <20050723165301.GB16571@blorf.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: <20050723165301.GB16571@blorf.net> User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jul 23, 2005 at 09:53:01AM -0700, Wayne Davison wrote: > That puts a standout-string "[EOL]" at the end of the output. Here's a potential patch for FAQ.yo if folks like the idea. I made the text bold too (if possible) and switched to using print with prompt expansion. ..wayne.. --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="faq.patch" --- Etc/FAQ.yo 19 Jul 2005 15:18:11 -0000 1.22 +++ Etc/FAQ.yo 23 Jul 2005 17:16:34 -0000 @@ -1664,13 +1664,13 @@ sect(How do I prevent the prompt overwri # Skip defining precmd if the PROMPT_SP option is available. if ! eval '[[ -o promptsp ]] 2>/dev/null'; then function precmd { + print -nP '%B%S[EOL]%s%b' # An efficient version using termcap multi-right: - echo -n ' ' # Output 1 space - echotc RI $((COLUMNS - 3)) + echotc RI $((COLUMNS - 7)) echo -n ' ' # Output 2 spaces - # Alternately, try replacing the above 3 lines with this echo - # that outputs a screen-column-width of spaces: - #echo -n ${(l:$COLUMNS:::):-} + # Alternately, try replacing the above 2 lines with this echo + # that pads the line with spaces: + #echo -n ${(l:$((COLUMNS-5)):::):-} } fi ) --mYCpIKhGyMATD0i+--