zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@math.gatech.edu
Subject: Re:  More about ${(l:e::s1::s2:)param}
Date: Mon, 16 Nov 1998 10:14:09 +0100 (MET)	[thread overview]
Message-ID: <199811160914.KAA10355@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Sun, 15 Nov 1998 15:25:25 -0800


Bart Schaefer wrote:

> 
> 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?

The doc. At least what you get is what I intended when I added this
(we had some real-world example for the use of this at the time, but I 
don't remember it anymore).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~1998-11-16  9:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-16  9:14 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-11-04 21:34 Arithmetic expression (bug?) Phil Pennock
1998-11-15 23:25 ` More about ${(l:e::s1::s2:)param} Bart Schaefer

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=199811160914.KAA10355@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --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).