help / color / mirror / code / Atom feed
* typeset -LZ
@ 2023-02-03  4:06 Ray Andrews
  0 siblings, 0 replies; only message in thread
From: Ray Andrews @ 2023-02-03  4:06 UTC (permalink / raw)
  To: Zsh Users

3 /aWorking/Zsh/Source/Wk 0 $ unset aaa; typeset aaa='  001200  '; dp 
aaa; echo $aaa
scalar aaa='  001200  '

3 /aWorking/Zsh/Source/Wk 0 $ unset aaa; typeset -L aaa='  001200 '; dp 
aaa; echo $aaa
scalar-left aaa='  001200  '

3 /aWorking/Zsh/Source/Wk 0 $ unset aaa; typeset -LZ aaa='001200 '; dp 
aaa; echo $aaa
scalar-left-right_zeros aaa='001200  '

3 /aWorking/Zsh/Source/Wk 0 $ unset aaa; typeset -LZ aaa=' 001200  '; dp 
aaa; echo $aaa
scalar-left-right_zeros aaa='  001200  '

... Is the last output really what we want?  '-LZ' ends up having no 
effect if there are leading spaces.  Wouldn't it be more useful if the 
leading spaces were always removed, as '-L' promises to do, and the '-Z' 
then insured that leading zeros were stripped as well?  That is, 
shouldn't the last two commands above both output '1200'?  As it is, the 
'-Z' and the '-L' basically cancel each other.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-03  4:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03  4:06 typeset -LZ Ray Andrews

Code repositories for project(s) associated with this public inbox


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).