From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6499 invoked from network); 12 Mar 2004 10:56:55 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Mar 2004 10:56:55 -0000 Received: (qmail 13286 invoked by alias); 12 Mar 2004 10:56:03 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7156 Received: (qmail 13274 invoked from network); 12 Mar 2004 10:56:03 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 12 Mar 2004 10:56:03 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [167.160.213.139] by sunsite.dk (MessageWall 1.0.8) with SMTP; 12 Mar 2004 10:56:2 -0000 Received: from moonbase.zanshin.com (IDENT:schaefer@localhost [127.0.0.1]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i2CAu1Bq029839 for ; Fri, 12 Mar 2004 02:56:01 -0800 Received: (from schaefer@localhost) by moonbase.zanshin.com (8.12.11/8.12.11/Submit) id i2CAu13f029838 for zsh-users@sunsite.dk; Fri, 12 Mar 2004 02:56:01 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i2CAtuV22296; Fri, 12 Mar 2004 02:55:56 -0800 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040312105556.ZM22295@candle.brasslantern.com> Date: Fri, 12 Mar 2004 10:55:56 +0000 In-Reply-To: <1mm7og67rpkdy.dlg@thorstenkampe.de> Comments: In reply to Thorsten Kampe "Justifying text output" (Mar 12, 3:01am) References: <1mm7og67rpkdy.dlg@thorstenkampe.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: Justifying text output MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Envelope-Sender: On Mar 12, 3:01am, Thorsten Kampe wrote: } } there any way to make the "[ ok ]"/"[ failed ]" messages on the right } justified? Change each "echo" from e.g. this: echo "${ltgreen}* ${white}compiling $file [ ${ltgreen}ok ${white}]" To this: echo ${(r:70:):-"${ltgreen}* ${white}compiling $file"}"[ ${ltgreen}ok ${white}]" Note the placement of the quotes and closing curly-brace. The (r:70:) parameter flag counts all characters -- it doesn't know that ${green} and ${white} expand to zero-width color changes -- so you have to increase the padding to compensate. You could do e.g.: ((PAD = COLUMNS - 12 + ${#ltgreen} + ${#white})) and then echo ${(r:PAD:):-"${ltgreen}* ${white}compiling $file"} ...