about summary refs log tree commit diff
path: root/README
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-08 11:01:15 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-08 17:15:40 +0000
commit73622ae2880a599ad7ed84d43538c34cf55a48ca (patch)
treec532fc87588f22d69c28fb5b30233521eda38fcf /README
parent198c7bc2324d58ddc39c180b74eb7c00834fe623 (diff)
downloadzsh-73622ae2880a599ad7ed84d43538c34cf55a48ca.tar.gz
zsh-73622ae2880a599ad7ed84d43538c34cf55a48ca.tar.xz
zsh-73622ae2880a599ad7ed84d43538c34cf55a48ca.zip
39236 (plus typo fix): docs: Tweak _arguments $opt_args documentation added in 39173.
Diffstat (limited to 'README')
-rw-r--r--README11
1 files changed, 8 insertions, 3 deletions
diff --git a/README b/README
index 019294e4b..d146d4b16 100644
--- a/README
+++ b/README
@@ -91,10 +91,15 @@ equivalent of "*(1)") as well as many other forms.
 and colons in the values of option arguments when populating the $opt_args
 associative array.  Previously, colons were escaped with a backslash but
 backslashes were not themselves escaped with a backslash, which lead to
-ambiguity: if the -x option took two arguments (as in
+ambiguity: '-x foo\:bar' (one argument with a backslashed colon) and
+'-x foo\\ bar' (two arguments, and the first one ends in a backslash) would
+both set $opt_args[-x] to the same value.  This example assumes the -x
+option's spec declared two arguments, as in:
     _arguments : -x:foo:${action}:bar:$action
-), it would be impossible to tell from $opt_args whether the command-line
-was '-x foo\:bar' or '-x foo\\ bar'.
+
+For the more common case of non-repeatable options that take a single
+argument, completion functions now have to unescape not only colons but
+also backslashes when obtaining the option's argument from $opt_args.
 
 Incompatibilities between 5.0.8 and 5.2
 ---------------------------------------