diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2021-10-24 21:32:58 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2021-10-24 21:32:58 +0900 |
commit | c7a391fa0562a86605a676a313a4f512d8de1979 (patch) | |
tree | e888d4481d7b16030a848412b92c0e3b7f321d36 /Completion/Base | |
parent | e40938c1287beaeb6eaeb0a4ce62d786a65930d3 (diff) | |
download | zsh-c7a391fa0562a86605a676a313a4f512d8de1979.tar.gz zsh-c7a391fa0562a86605a676a313a4f512d8de1979.tar.xz zsh-c7a391fa0562a86605a676a313a4f512d8de1979.zip |
49493: fix '_arguments --' to correctly recognize optional argument
Diffstat (limited to 'Completion/Base')
-rw-r--r-- | Completion/Base/Utility/_arguments | 4 |
1 files changed, 2 insertions, 2 deletions
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 |