summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-01-10 19:55:28 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-01-10 20:22:37 +0000
commit5731581c4ce8dc9a918445f6bbac2051674ee4b5 (patch)
treeca5b3be3fa3148756b3730a5dae50290109f415b
parent82210cb954cc70708a0e22e6bc8c8ae8c22be749 (diff)
downloadzsh-5731581c4ce8dc9a918445f6bbac2051674ee4b5.tar.gz
zsh-5731581c4ce8dc9a918445f6bbac2051674ee4b5.zip
37551: Include the builtin's name in a "bad option" error message.
Example: «zsh -fc 'zle -z'» now prepends "zle:" to the error message.
-rw-r--r--ChangeLog5
-rw-r--r--Src/builtin.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 644caa026..b99cec5e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-10 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 37551: Src/builtin.c: Include the builtin's name in a "bad
+ option" error message.
+
2016-01-10 Eric Cook <llua@gmx.com>
* 37534: Matthew Martin: Completion/BSD/Command/_cu,
Completion/BSD/Command/_fw_update, Completion/BSD/Command/_rcctl
diff --git a/Src/builtin.c b/Src/builtin.c
index 5dce2d9f1..e1a799009 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;