* [PATCH] _regex_words: Don't add mismatched parentheses
@ 2015-11-25 1:46 Daniel Shahaf
0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2015-11-25 1:46 UTC (permalink / raw)
To: zsh-workers
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
---
diff --git a/Completion/Base/Utility/_regex_words b/Completion/Base/Utility/_regex_words
index 77ba197..62c2491 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-25 1:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 1:46 [PATCH] _regex_words: Don't add mismatched parentheses Daniel Shahaf
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).