diff options
| author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-11-25 01:46:55 +0000 |
|---|---|---|
| committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-11-27 07:26:38 +0000 |
| commit | 2ab41d508d453be2305b898325a9a87f00aaebda (patch) | |
| tree | 4e668f4b698d0e253073544f2bdc6fa0ca95dd06 /Completion/Base | |
| parent | 37229: non-local assignment to a parameter name whose outermost declaration i... (diff) | |
| download | zsh-2ab41d508d453be2305b898325a9a87f00aaebda.tar zsh-2ab41d508d453be2305b898325a9a87f00aaebda.tar.gz zsh-2ab41d508d453be2305b898325a9a87f00aaebda.tar.bz2 zsh-2ab41d508d453be2305b898325a9a87f00aaebda.tar.lz zsh-2ab41d508d453be2305b898325a9a87f00aaebda.tar.xz zsh-2ab41d508d453be2305b898325a9a87f00aaebda.tar.zst zsh-2ab41d508d453be2305b898325a9a87f00aaebda.zip | |
37215: _regex_words: Don't add mismatched parentheses
I ran into this in the wild¹, it manifested as the following error message:
zregexparse:4: not enough regex arguments
¹ https://bug.tasktools.org/browse/TW-1729
Diffstat (limited to 'Completion/Base')
| -rw-r--r-- | Completion/Base/Utility/_regex_words | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Completion/Base/Utility/_regex_words b/Completion/Base/Utility/_regex_words index 77ba197a4..62c2491bb 100644 --- a/Completion/Base/Utility/_regex_words +++ b/Completion/Base/Utility/_regex_words @@ -20,7 +20,13 @@ local tag=$1 local desc=$2 shift 2 -reply=(\() +if (( $# )); then + reply=(\() +else + # ### Is this likely to happen in callers? Should we warn? + reply=() + return +fi integer i local -a wds |
