I can give the
-U attribute to a non-associative array so that it can't contain duplicate elements:
% declare -U path % path=( ~/bin $path ) % path=( ~/bin $path ) % echo $path
Here, even though I've added
~/bin to the array
path twice, the latter contains only one
I'm looking for a way to print all the attributes which can be given to a parameter during an assignment, including this
I've looked at the
typeset command in
man zshbuiltins, and found this excerpt:
Except when assignments are made with name=value, using +m forces the matching parameters and their attributes to be printed, even inside a function.
So, I've tried executing these commands:
% declare -U path % declare +m 'path'
Whose output is:
While it tells me the type of the parameter (here an array), it doesn't tell me that it has the
Is there another command which would print all the attributes of a parameter?