summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Utility/_arguments4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 21e72305a..22cbff507 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-10-24 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
+
+ * 49493: Completion/Base/Utility/_arguments: fix handling of
+ optional argument of long option in help text
+
2021-10-23 Oliver Kiddle <opk@zsh.org>
* 49499 based on 49496 by Jun T.: Src/Zle/computil.c
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index 3f1b39304..cab7c929e 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -132,8 +132,8 @@ if (( long )); then
# variant syntax seen in fetchmail:
# --[fetch]all means --fetchall or --all.
# maybe needs to be more general
- if [[ $start = (#b)(*)\[(*)\](*) ]]; then
- tmp+=("${match[1]}${match[2]}${match[3]}" "${match[1]}${match[3]}")
+ if [[ $start = (#b)--\[(*)\](*) ]]; then
+ tmp+=("--${match[1]}${match[2]}" "--${match[2]}")
else
tmp+=($start)
fi