From d1d3bbb458b50ec455d65774d5c6669546b3b4ca Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 14 Jun 2019 13:34:45 +0000 Subject: [PATCH] Show filename with -v for source-file. --- cmd-parse.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd-parse.y b/cmd-parse.y index 1a6af3e7..1dbc27a7 100644 --- a/cmd-parse.y +++ b/cmd-parse.y @@ -517,7 +517,10 @@ cmd_parse_print_commands(struct cmd_parse_input *pi, u_int line, if (pi->item != NULL && (pi->flags & CMD_PARSE_VERBOSE)) { s = cmd_list_print(cmdlist, 0); - cmdq_print(pi->item, "%u: %s", line, s); + if (pi->file != NULL) + cmdq_print(pi->item, "%s:%u: %s", pi->file, line, s); + else + cmdq_print(pi->item, "%u: %s", line, s); free(s); } }