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

Amusing (?) behavior of zsh/parameter specials



This is clearly a side-effect of feature autoloading, but:

torch% typeset -m -p fun\*
typeset functrace
typeset funcsourcetrace
typeset funcstack
typeset functions
typeset funcfiletrace
torch% : $funcstack
torch% typeset -m -p fun\*
typeset functrace
typeset funcsourcetrace
typeset functions
typeset funcfiletrace
torch% () { print $functrace }
Src/zsh:21
torch% typeset -m -p fun\*    
typeset funcsourcetrace
typeset functions
typeset funcfiletrace

Note how each parameter name disappears from the typeset output after it
has been reference once.

torch% print ${(t)functrace}
array-readonly-hide-hideval-special

Probably there's nothing to be done about this, I just found it curious.
Maybe autoloaded parameters should always be hidden until they load?



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