diff options
author | Peter Stephenson <pws@zsh.org> | 2014-07-08 09:38:48 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2014-07-08 09:38:48 +0100 |
commit | f6b322979b785a9711a17dcc2170228f8a756c6d (patch) | |
tree | 10103ca10ed747ee7797302c65b3e9380a6ed966 | |
parent | 2abc8530dd259c3ac734e9464d2aa546c69b27ad (diff) | |
download | zsh-f6b322979b785a9711a17dcc2170228f8a756c6d.tar.gz zsh-f6b322979b785a9711a17dcc2170228f8a756c6d.tar.xz zsh-f6b322979b785a9711a17dcc2170228f8a756c6d.zip |
Attempt to improve doc for assignment
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Doc/Zsh/grammar.yo | 6 | ||||
-rw-r--r-- | Doc/Zsh/params.yo | 10 |
3 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index d8dd43ada..fbc016d0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-07-08 Peter Stephenson <p.stephenson@samsung.com> + + * 32832: Doc/Zsh/grammar.yo Doc/Zsh/params.yo: attempt to + improve documentation for how assignment works. + 2014-07-03 Axel Beckert <abe@deuxchevaux.org> * Felipe Sateler: 32819: Completion/Debian/Command/_axi-cache: diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo index 719f06a97..77f0098e3 100644 --- a/Doc/Zsh/grammar.yo +++ b/Doc/Zsh/grammar.yo @@ -19,7 +19,11 @@ cindex(simple commands) cindex(commands, simple) A em(simple command) is a sequence of optional parameter assignments followed by blank-separated words, -with optional redirections interspersed. +with optional redirections interspersed. For a description +of assignment, see the beginning of +ifnzman(noderef(Parameters))\ +ifzman(zmanref(zshparam)). + The first word is the command to be executed, and the remaining words, if any, are arguments to the command. If a command name is given, the parameter assignments modify diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index 5bccdc2d0..dbac51182 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -21,14 +21,20 @@ indent(var(name)tt(=)var(value)) If the integer attribute, tt(-i), is set for var(name), the var(value) is subject to arithmetic evaluation. Furthermore, by replacing `tt(=)' -with `tt(+=)', a parameter can be added or appended to. See +with `tt(+=)', a parameter can be added or appended to. + +In scalar assignment, var(value) is expanded as a single string, in +which the elements of arrays are joined together; filename expansion is +not performed unless the option tt(GLOB_ASSIGN) is set. See noderef(Array Parameters) for additional forms of assignment. To refer to the value of a parameter, write `tt($)var(name)' or `tt(${)var(name)tt(})'. See ifzman(em(Parameter Expansion) in zmanref(zshexpn))\ ifnzman(noderef(Parameter Expansion)) -for complete details. +for complete details. This section also explains the effect +of the difference between scalar and array assignment on parameter +expansion. In the parameter lists that follow, the mark `<S>' indicates that the parameter is special. |