about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-10-30 14:01:32 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-10-30 14:01:32 +0000
commita232ab562423eccb9523c190c5e03242320cc3fd (patch)
tree78161b5cbd651fd5174689950c226b301addd653 /Doc
parent12a38ba4f725e423e9f5ab4c87af7fc03663b90e (diff)
downloadzsh-a232ab562423eccb9523c190c5e03242320cc3fd.tar.gz
zsh-a232ab562423eccb9523c190c5e03242320cc3fd.tar.xz
zsh-a232ab562423eccb9523c190c5e03242320cc3fd.zip
users/12149: "@" with splitting in double quotes retains empty fields
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/expn.yo11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index cc87ebe6f..f48616580 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -960,6 +960,17 @@ separator var(string).  Note that a var(string) of two or more
 characters means that all of them must match in sequence; this differs from
 the treatment of two or more characters in the tt(IFS) parameter.
 See also the tt(=) flag and the tt(SH_WORD_SPLIT) option.
+
+For historical reasons, the usual behaviour that empty array elements
+are retained inside double quotes is disabled for arrays generated
+by splitting; hence the following:
+
+example(line="one::three"
+print -l "${(s.:.)line}")
+
+produces two lines of output for tt(one) and tt(three) and elides the
+empty field.  To override this behaviour, supply the "(@)" flag as well,
+i.e.  tt("${(@s.:.)line}").
 )
 enditem()