summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Doc/Zsh/params.yo6
-rw-r--r--Functions/Misc/allopt2
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a7da7e4c..3c1192b3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,13 @@
* 42243: Src/Modules/pcre.c: Free stuff properly in zsh/pcre
module
+2018-01-19 Barton E. Schaefer <schaefer@zsh.org>
+
+ * dana: 41924: Doc/Zsh/params.yo: (wi) subscript flag interaction
+
+ * Sebastian Gniazdowski: 41839: Functions/Misc/allopt: force IFS
+ to default for "read"
+
2018-01-18 Peter Stephenson <p.stephenson@samsung.com>
* 42294: Completion/compinit: disable REPORTTIME in completion.
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index bb5c8a54d..8a7fe5f5f 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -328,8 +328,10 @@ startitem()
item(tt(w))(
If the parameter subscripted is a scalar then this flag makes
subscripting work on words instead of characters. The default word
-separator is whitespace. This flag may not be used with the tt(i) or
-tt(I) flag.
+separator is whitespace. When combined with the tt(i) or tt(I) flag,
+the effect is to produce the index of the first character of the
+first/last word which matches the given pattern; note that a failed
+match in this case always yields 0.
)
item(tt(s:)var(string)tt(:))(
This gives the var(string) that separates words (for use with the
diff --git a/Functions/Misc/allopt b/Functions/Misc/allopt
index 0c521f391..5d5d2885a 100644
--- a/Functions/Misc/allopt
+++ b/Functions/Misc/allopt
@@ -8,7 +8,7 @@
# Written by Sweth Chandramouli with hacks by Bart Schaefer.
listalloptions () {
- local OPT_NAME OPT_VALUE
+ local OPT_NAME OPT_VALUE IFS=$' \t\n'
builtin set -o | while read OPT_NAME OPT_VALUE ; do
if [[ ${OPT_NAME#no} != ${OPT_NAME} ]] ; then
OPT_VALUE=${(L)${${OPT_VALUE:s/on/OFF}:s/off/on}}