Subject: [PATCH] Include the builtin's name in a "bad option" error message.
From: Daniel Shahaf <[email-masked]>
To: [email-masked]
Date: Sun, 10 Jan 2016 19:55:28 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Example: «zsh -fc 'zle -z'» now prepends "zle:" to the error message.
---
 Src/builtin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Src/builtin.c b/Src/builtin.c
index b06bc6d..465c8cc 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -387,7 +387,7 @@ execbuiltin(LinkList args, LinkList assigns, Builtin bn)
 		if (*arg) {
 		    if(*arg == Meta)
 			*++arg ^= 32;
-		    zwarn("bad option: -%c", *arg);
+		    zwarnnam(name, "bad option: -%c", *arg);
 		    return 1;
 		}
 		arg = *++argv;
-- 
2.1.4