From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: padding.
Date: Sat, 11 Feb 2017 17:54:09 -0800 [thread overview]
Message-ID: <ee3c8ad2-41e3-f3e4-9347-d6e395b85d8e@eastlink.ca> (raw)
In-Reply-To: <170211110437.ZM467@torch.brasslantern.com>
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?
next prev parent reply other threads:[~2017-02-12 1:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-11 3:15 padding Ray Andrews
2017-02-11 19:04 ` padding Bart Schaefer
2017-02-12 1:54 ` Ray Andrews [this message]
2017-02-12 2:11 ` padding Ray Andrews
[not found] ` <ee3c8ad2-41e3-f3e4-9347-d6e395b85d8e__47549.2452657365$1486864527$gmane$org@eastlink.ca>
2017-02-12 6:14 ` padding Daniel Shahaf
2017-02-12 20:10 ` padding Ray Andrews
2017-02-13 21:58 ` padding Ray Andrews
[not found] ` <CAHYJk3SKvOSOBgK6GTVnbqL1mJ7mnwchoAbVKjjNRE8FjFWNYQ@mail.gmail.com>
2017-02-14 5:51 ` padding Ray Andrews
[not found] <0befdb38-eaa5-6388-a3fe-58b1a73834b7__26816.8318471455$1486784821$gmane$org@eastlink.ca>
2017-02-11 6:29 ` padding Daniel Shahaf
2017-02-11 18:43 ` padding Ray Andrews
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee3c8ad2-41e3-f3e4-9347-d6e395b85d8e@eastlink.ca \
--to=rayandrews@eastlink.ca \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).