Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: End Index number not what I expected



Peter Stephenson wrote on Tue, Dec 06, 2016 at 20:16:29 +0000:
> +++ b/Doc/Zsh/expn.yo
> @@ -1394,7 +1394,8 @@ item(tt(B))(
>  item(tt(E))(
> -Include the index of the end of the match in the result.
> +Include the index one character past the end of the match in the result
> +(note this is inconsistent with other uses of parameter index).

Also:

diff --git a/Completion/Zsh/Context/_brace_parameter b/Completion/Zsh/Context/_brace_parameter
index e77d4c5..ae69f77 100644
--- a/Completion/Zsh/Context/_brace_parameter
+++ b/Completion/Zsh/Context/_brace_parameter
@@ -179,7 +179,7 @@ if [[ $PREFIX = *'${('[^\)]# ]]; then
     "S:search substrings in #, %, / expressions"
     "I:search <argument>th match in #, %, / expressions"
     "B:include index of beginning of match in #, %, / expressions"
-    "E:include index of end of match in #, %, / expressions"
+    "E:include index of one past end of match in #, %, / expressions"
     "M:include matched portion in #, %, / expressions"
     "N:include length of match in #, % expressions"
     "R:include rest (unmatched portion) in #, %, / expressions"

I'll commit this now.



Messages sorted by: Reverse Date, Date, Thread, Author