diff options
Diffstat (limited to 'cmd-source-file.c')
-rw-r--r-- | cmd-source-file.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd-source-file.c b/cmd-source-file.c index fbe01c21..bfb530b7 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -38,8 +38,8 @@ const struct cmd_entry cmd_source_file_entry = { .name = "source-file", .alias = "source", - .args = { "q", 1, 1 }, - .usage = "[-q] path", + .args = { "nq", 1, 1 }, + .usage = "[-nq] path", .flags = 0, .exec = cmd_source_file_exec @@ -59,7 +59,9 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item) u_int i; if (args_has(args, 'q')) - flags |= CFG_QUIET; + flags |= CMD_PARSE_QUIET; + if (args_has(args, 'n')) + flags |= CMD_PARSE_PARSEONLY; if (*path == '/') pattern = xstrdup(path); @@ -72,7 +74,7 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item) retval = CMD_RETURN_NORMAL; if (glob(pattern, 0, NULL, &g) != 0) { - if (errno != ENOENT || (~flags & CFG_QUIET)) { + if (errno != ENOENT || (~flags & CMD_PARSE_QUIET)) { cmdq_error(item, "%s: %s", path, strerror(errno)); retval = CMD_RETURN_ERROR; } |