mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 17:10:59 +01:00
More [key]=value tweaks
Some rephrasings. Update typeset -p for associative arrays to use new syntax.
This commit is contained in:
parent
7ca2e97c14
commit
ab7be4238c
6 changed files with 24 additions and 10 deletions
|
|
@ -763,6 +763,7 @@
|
|||
for key in ${(ok)keyvalhash}; do
|
||||
print -l $key $keyvalhash[$key]
|
||||
done
|
||||
typeset -p keyvalhash
|
||||
0:Substitution in [key]=val syntax
|
||||
>*
|
||||
>?not_globbed?
|
||||
|
|
@ -776,3 +777,4 @@
|
|||
>another value
|
||||
>the key
|
||||
>the value
|
||||
>typeset -A keyvalhash=( ['*']='?not_globbed?' ['another key']='another value' ['the key']='the value' )
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
print ${(kv)hash_test}
|
||||
0:private hides value from surrounding scope in nested scope
|
||||
>typeset -a hash_test=( top level )
|
||||
>typeset -A hash_test=( in function )
|
||||
>typeset -A hash_test=( [in]=function )
|
||||
>typeset -g -a hash_test=( top level )
|
||||
>array-local top level
|
||||
>top level
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue