summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-11-22 11:42:47 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-11-22 11:42:47 +0000
commitcc9bc2dd0b90cbf920794f15d0fce73fe04babac (patch)
treebcf101de55b998fdf0f7eca2c7252e442952e1f2 /Doc
parente6946adf57a44fe84781f20c395ba51bd39fd4d9 (diff)
downloadzsh-cc9bc2dd0b90cbf920794f15d0fce73fe04babac.tar.gz
zsh-cc9bc2dd0b90cbf920794f15d0fce73fe04babac.tar.xz
zsh-cc9bc2dd0b90cbf920794f15d0fce73fe04babac.zip
28424: new POSIX_STRINGS option
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/options.yo27
1 files changed, 27 insertions, 0 deletions
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index d334f5829..467c92723 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -1891,6 +1891,33 @@ If multibyte character support is not compiled into the shell this option is
 ignored; all octets with the top bit set may be used in identifiers.
 This is non-standard but is the traditional zsh behaviour.
 )
+pindex(POSIX_STRINGS)
+pindex(NO_POSIX_STRINGS)
+pindex(POSIXSTRINGS)
+pindex(NOPOSIXSTRINGS)
+cindex(discarding embedded nulls in $'...')
+cindex(embedded nulls, in $'...')
+cindex(nulls, embedded in $'...')
+item(tt(POSIX_STRINGS) <K> <S>)(
+This option affects processing of quoted strings.  Currently it only
+affects the behaviour of null characters, i.e. character 0 in the
+portable character set corresponding to US ASCII.
+
+When this option is not set, null characters embedded within strings
+of the form tt($')var(...)tt(') are treated as ordinary characters. The
+entire string is maintained within the shell and output to files where
+necessary, although owing to restrictions of the library interface
+the string is truncated at the null character in file names, environment
+variables, or in arguments to external programs.
+
+When this option is set, the tt($')var(...)tt(') expression is truncated at
+the null character.  Note that remaining parts of the same string
+beyond the termination of the quotes are not trunctated.
+
+For example, the command line argument tt(a$'b\0c'd) is treated with
+the option off as the characters tt(a), tt(b), null, tt(c), tt(d),
+and with the option on as the characters tt(a), tt(b), tt(d).
+)
 pindex(POSIX_TRAPS)
 pindex(NO_POSIX_TRAPS)
 pindex(POSIXTRAPS)