From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25679 invoked by alias); 12 Feb 2017 01:54:15 -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: 22452 Received: (qmail 26342 invoked from network); 12 Feb 2017 01:54:15 -0000 X-Qmail-Scanner-Diagnostics: from mta03.eastlink.ca by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(24.224.136.9):SA:0(-0.7/5.0):. Processed in 0.72931 secs); 12 Feb 2017 01:54:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: rayandrews@eastlink.ca X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.eastlink.ca designates 24.224.136.9 as permitted sender) X-Authority-Analysis: v=2.2 cv=DOfN2GFb c=1 sm=1 tr=0 a=aWG3ZaPfpGbmBTXoUM+q2Q==:117 a=aWG3ZaPfpGbmBTXoUM+q2Q==:17 a=N659UExz7-8A:10 a=S9EWPtvoG1nCmGdHxUsA:9 a=pILNOxqGKmIA:10 X-EL-IP-NOAUTH: 24.207.17.185 Subject: Re: padding. To: zsh-users@zsh.org References: <0befdb38-eaa5-6388-a3fe-58b1a73834b7@eastlink.ca> <170211110437.ZM467@torch.brasslantern.com> From: Ray Andrews Message-id: Date: Sat, 11 Feb 2017 17:54:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-version: 1.0 In-reply-to: <170211110437.ZM467@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 11/02/17 11:04 AM, Bart Schaefer wrote: > integer -Z 6 vvar=-1 Perfect! Amazing what's hiding under the hood. I always prefer to do as much as possible with built in functionality. > I don't think you can, except by specifying a field width of 6. Even > printf is going to treat the "-" as part of the field width. Yeah, it would be more complicated and more involved to get a neat printout. The engineer in me does want the field width to be independent of the sign, but it's a trivial matter. BTW, is this kosher: |$ if [ "$1" = "start" ]; then|| || if [ "$1" = 'null' ] && return|| || fi|| || ||(no message) and:|| || ||$ if [ "$1" = "start" ]; then|| || # if [ "$1" = 'null' ] && return|| || fi|| || ||(no message) but:|| || ||$ # if [ "$1" = "start" ]; then|| || if [ "$1" = 'null' ] && return|| || # fi|| || ||||./test2:7: parse error near `\n'|| | ... I just noticed this in some of my code. Seems to me that samples one and two above should throw an error because there are two 'fi' needed but they seem to be sharing the single one. And sample three gets it right, no?