diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-01-09 19:29:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-01-09 19:29:13 +0000 |
commit | 74d6d501d03830ab6a462cfaf0cdf69d5ee81f15 (patch) | |
tree | 4a1e98208fc1f76fb6aa7d2f3092be6c70b3e587 /usr.bin | |
parent | 4e005dd359990638f38d06ebf4dabd919cbd63b9 (diff) |
source-file -q needs to apply to glob(3) too.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/cmd-source-file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-source-file.c b/usr.bin/tmux/cmd-source-file.c index bfac10a6ddc..8863610df02 100644 --- a/usr.bin/tmux/cmd-source-file.c +++ b/usr.bin/tmux/cmd-source-file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-source-file.c,v 1.31 2017/01/09 19:27:00 nicm Exp $ */ +/* $OpenBSD: cmd-source-file.c,v 1.32 2017/01/09 19:29:12 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha <me@tiagocunha.org> @@ -55,11 +55,13 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item) glob_t g; int i; + quiet = args_has(args, 'q'); if (glob(args->argv[0], 0, NULL, &g) != 0) { + if (quiet && errno == ENOENT) + return (CMD_RETURN_NORMAL); cmdq_error(item, "%s: %s", args->argv[0], strerror(errno)); return (CMD_RETURN_ERROR); } - quiet = args_has(args, 'q'); retval = CMD_RETURN_NORMAL; for (i = 0; i < g.gl_pathc; i++) { |