From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-workers@math.gatech.edu
Subject: More about ${(l:e::s1::s2:)param}
Date: Sun, 15 Nov 1998 15:25:25 -0800 [thread overview]
Message-ID: <981115152525.ZM30094@candle.brasslantern.com> (raw)
In-Reply-To: <199811042134.VAA01156@athenaeum.demon.co.uk>
The info says:
`l:'EXPR`::'STRING1`::'STRING2`:'
Pad the resulting words on the left. Each word will be truncated
if required and placed in a field EXPR characters wide. The space
to the left will be filled with STRING1 (concatenated as often as
needed) or spaces if STRING1 is not given. If both STRING1 and
STRING2 are given, this string will be placed exactly once
directly to the left of the resulting word.
`r:'EXPR`::'STRING1`::'STRING2`:'
As `l', but pad the words on the right.
Apparently "the resulting word" is "the word before padding with STRING1":
zagzig<1> foo=77
zagzig<2> print -- ${(l:5::0::x:)foo}
00x77
zagzig<3> print -- ${(r:5::0::x:)foo}
77x00
The doc phrasing led me to expect x00077 and 77000x. What needs fixing,
the doc or the code?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
next prev parent reply other threads:[~1998-11-15 23:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-04 21:34 Arithmetic expression (bug?) Phil Pennock
1998-11-04 22:05 ` Bernd Eggink
1998-11-05 1:40 ` Phil Pennock
1998-11-15 22:21 ` Bart Schaefer
1998-11-15 22:46 ` Bart Schaefer
1998-11-15 23:19 ` PATCH: 3.1.5 and 3.0.5: ${(l<e><s1><s2>)param} (was Re: Arithmetic expression (bug?)) Bart Schaefer
1998-11-15 23:25 ` Bart Schaefer [this message]
1998-11-16 9:14 More about ${(l:e::s1::s2:)param} Sven Wischnowsky
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=981115152525.ZM30094@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@math.gatech.edu \
/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).