diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-10-30 14:01:32 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-10-30 14:01:32 +0000 |
commit | a232ab562423eccb9523c190c5e03242320cc3fd (patch) | |
tree | 78161b5cbd651fd5174689950c226b301addd653 /Doc/Zsh | |
parent | 12a38ba4f725e423e9f5ab4c87af7fc03663b90e (diff) | |
download | zsh-a232ab562423eccb9523c190c5e03242320cc3fd.tar.gz zsh-a232ab562423eccb9523c190c5e03242320cc3fd.tar.xz zsh-a232ab562423eccb9523c190c5e03242320cc3fd.zip |
users/12149: "@" with splitting in double quotes retains empty fields
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/expn.yo | 11 |
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() |