diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2003-07-04 16:05:18 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-07-04 16:05:18 +0000 |
commit | e50b688cd5d246a6134fe614ae4efdf9e7dd649e (patch) | |
tree | 4800e1c6985e42c147b15fe81385679436cee744 /Doc | |
parent | 34eed61ac859067a628fecfd0fc3efee3bf2e91e (diff) | |
download | zsh-e50b688cd5d246a6134fe614ae4efdf9e7dd649e.tar.gz zsh-e50b688cd5d246a6134fe614ae4efdf9e7dd649e.tar.xz zsh-e50b688cd5d246a6134fe614ae4efdf9e7dd649e.zip |
18571: extra note on += for associative arrays
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Zsh/params.yo | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index 889ab3f85..675a75991 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -257,6 +257,16 @@ patterns used for reverse subscripting (the `tt(r)', `tt(R)', `tt(i)', etc. flags), but it may also affect parameter substitutions that appear as part of an arithmetic expression in an ordinary subscript. +It is possible to avoid the use of subscripts in assignments to associative +array elements by using the syntax: + +example( + aa+=('key with "*strange*" characters' 'value string') +) + +This adds a new key/value pair if the key is not already present, and +replaces the value for the existing key if it is. + The basic rule to remember when writing a subscript expression is that all text between the opening `tt([)' and the closing `tt(])' is interpreted em(as if) it were in double quotes (\ |