Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Include the builtin's name in a "bad option" error message.



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



Messages sorted by: Reverse Date, Date, Thread, Author