From c7a391fa0562a86605a676a313a4f512d8de1979 Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Sun, 24 Oct 2021 21:32:58 +0900 Subject: 49493: fix '_arguments --' to correctly recognize optional argument --- Completion/Base/Utility/_arguments | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Completion/Base/Utility') 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 -- cgit 1.4.1