diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/error.c | 2 | ||||
-rw-r--r-- | bin/sh/parser.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/bin/sh/error.c b/bin/sh/error.c index c76a9dc..96a0092 100644 --- a/bin/sh/error.c +++ b/bin/sh/error.c @@ -139,6 +139,8 @@ vwarning(const char *msg, va_list ap) { if (commandname) outfmt(out2, "%s: ", commandname); + else if (arg0) + outfmt(out2, "%s: ", arg0); doformat(out2, msg, ap); out2fmt_flush("\n"); } 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); } |