From: "Lawrence Velázquez" <larryv@zsh.org>
To: "Ray Andrews" <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: (j.|.)
Date: Wed, 01 Feb 2023 19:43:23 -0500 [thread overview]
Message-ID: <e7689e4b-cd37-4dc1-ae44-361230185996@app.fastmail.com> (raw)
In-Reply-To: <bcf85d47-b522-d29d-434e-44eb749aa2d3@eastlink.ca>
On Wed, Feb 1, 2023, at 5:47 PM, Ray Andrews wrote:
> I guess nobody's interested in these things but here's another
> interesting one:
>
>
> 3 /aWorking/Zsh/Source/Wk 0 $ typeset -LZ zz=' Howdy '; echo $zz;
> dp zz
> How
> scalar-left-right_zeros zz=' Howdy '
>
> Doc only says that '-LZ' will be specially handled but doesn't say how
> right there.
Look at the documentation for "typeset -L".
> BTW we seem to use 'zeroes' sometimes in the docs
> which is strictly speaking correct for 'zeroes in on the target' but
> deprecated as the plural.
Debatable. No reason to use both, though.
> Ah! It's not documented that I can see, but maybe the above is
> accurately descriptive:
>
>
> 3 /aWorking/Zsh/Source/Wk 0 $ typeset -LZ zz='000Howdy000'; echo
> $zz; dp zz
> Howdy
> scalar-left-right_zeros zz=000Howdy000
>
> ... so thereyago, it stripped zeros left and right :-)
>
> Doc says leading zeros will be removed but silent about trailing zeros.
That's because nothing is done to trailing zeros.
% unset zz
% typeset -LZ zz=000Howdy000
% echo $zz
Howdy000
% print -nr -- $zz | od -A n -t a
H o w d y 0 0 0 sp sp sp
I can't reproduce your results. Try again in a clean shell, perhaps.
--
vq
next prev parent reply other threads:[~2023-02-02 0:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 16:38 (j.|.) Ray Andrews
2023-01-31 16:41 ` (j.|.) Roman Perepelitsa
2023-01-31 16:49 ` (j.|.) Ray Andrews
2023-01-31 17:50 ` (j.|.) Ray Andrews
2023-01-31 18:10 ` (j.|.) Roman Perepelitsa
2023-01-31 19:13 ` (j.|.) Ray Andrews
2023-01-31 20:19 ` (j.|.) Roman Perepelitsa
2023-01-31 21:50 ` (j.|.) Ray Andrews
2023-01-31 23:33 ` (j.|.) Lawrence Velázquez
2023-02-01 0:21 ` (j.|.) Ray Andrews
2023-02-01 1:33 ` (j.|.) Lawrence Velázquez
2023-02-01 1:59 ` (j.|.) Ray Andrews
2023-02-01 2:14 ` (j.|.) Ray Andrews
2023-02-01 22:47 ` (j.|.) Ray Andrews
2023-02-02 0:43 ` Lawrence Velázquez [this message]
2023-02-02 1:21 ` (j.|.) 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=e7689e4b-cd37-4dc1-ae44-361230185996@app.fastmail.com \
--to=larryv@zsh.org \
--cc=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).