Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: path PATH




On 2023-01-29 13:21, Lawrence Velázquez wrote:
On Sun, Jan 29, 2023, at 10:54 AM, Ray Andrews wrote:
BTW am I mistaken that 'hideval' is not discussed anywhere?
Look up typeset -H in zshbuiltins(1).

No mention of 'hideval' that I can see.  It's not a stretch to understand that '-H' will set the attribute that is called 'hideval' but IMHO that should be explicit.  That's why I suggest that all this stuff be explained in one place, namely in the 'Parameters' section of the manual.


BTW since 'typeset -p' claims to display information in the same format as for the recreation of the parameter:

1 /aWorking/Zsh/Source/Wk 0 $ typeset -Hi zzz=123

1 /aWorking/Zsh/Source/Wk 0 $ typeset -p zzz
typeset -i zzz

... but if I run that output as a new command, the -H is clearly lost.  'typeset -p' does not do what it claims to do.  Contrast my function (dp is the guts of it):

1 /aWorking/Zsh/Source/Wk 0 $ v zzz

Iv    zzz = !hidden!

... an integer with the 'hideval' attribute set.  Accurate and complete.  (Tho using my made-up contractions.) Long form:


1 /aWorking/Zsh/Source/Wk 0 $ allvars | grep zzz

zzz                       integer-hideval

'exported' and 'special' are discussed in the 'Parameters' section of the manual,  the others are not.  'readonly' is explicitly discussed in the above section of zshbuiltins but no other attribute names are.  'hideval' is referenced in the 'PARAMETER EXPANSION' section of the manual but nowhere else.  It's not optimal.  It might take a paragraph or two to completely cover the subject, why not do that?  What is the virtue in having bits of information on one subject scattered all over?

Seems that the subsection 'Parameter Expansion Flags' under 't' does show them all.  So it wouldn't be much work to flesh out the information there and merge it into 'Parameters' for a complete understanding of the subject in one place.








Messages sorted by: Reverse Date, Date, Thread, Author