From 6c8ea83ec558fc24d94e27f2623cdb9f1f16402a Mon Sep 17 00:00:00 2001 From: jilles Date: Sat, 22 Nov 2014 23:28:41 +0000 Subject: sh: Prepend "$0: " to error messages if there is no command name. --- bin/sh/parser.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin/sh/parser.c') diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 7fae29e..0048314 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1879,6 +1879,8 @@ synerror(const char *msg) { if (commandname) outfmt(out2, "%s: %d: ", commandname, startlinno); + else if (arg0) + outfmt(out2, "%s: ", arg0); outfmt(out2, "Syntax error: %s\n", msg); error((char *)NULL); } -- cgit v1.1