summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-11-07 10:04:14 +0000
committerPeter Stephenson <pws@zsh.org>2016-11-07 10:04:14 +0000
commit33b34890922b4f8ba47b68692d155611c0fc0f67 (patch)
tree0940eb1dabf570c547720a7fac45d0d55711426c /Doc/Zsh
parentbb28726fa5e29b7a5640cdab13e9d7a7e838f6a6 (diff)
downloadzsh-33b34890922b4f8ba47b68692d155611c0fc0f67.tar.gz
zsh-33b34890922b4f8ba47b68692d155611c0fc0f67.tar.xz
zsh-33b34890922b4f8ba47b68692d155611c0fc0f67.zip
zsh-users/22083: attempt to explain what a word is in parameter substitution.
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/expn.yo12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index b73151698..f465b2f60 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -572,6 +572,18 @@ noderef(Modifiers) in noderef(History Expansion) can be
 applied:  for example, tt(${i:s/foo/bar/}) performs string
 substitution on the expansion of parameter tt($i).
 
+In the following descriptions, `word' refers to a single word
+substituted on the command line, not necessarily a space delimited word.
+With default options, after the assignments:
+
+example(array=("first word" "second word")
+scalar="only word")
+
+then tt($array) substitutes two words, `tt(first word)' and `tt(second
+word)', and tt($scalar) substitutes a single word `tt(only word)'.  This
+may be modified by explicit or implicit word-splitting, however.  The
+full rules are complicated and are noted at the end.
+
 startitem()
 item(tt(${)var(name)tt(}))(
 The value, if any, of the parameter var(name) is substituted.