diff options
author | 2009-08-23 17:29:51 +0000 | |
---|---|---|
committer | 2009-08-23 17:29:51 +0000 | |
commit | c0a52a077a93202b5e3f6728d300943d8972961a (patch) | |
tree | f77d3e07911e684f36a0692e9ea2eced29f7df71 /usr.bin/tmux/cmd-source-file.c | |
parent | The cursession member in struct cmd_ctx is always either curclient->session or (diff) | |
download | wireguard-openbsd-c0a52a077a93202b5e3f6728d300943d8972961a.tar.xz wireguard-openbsd-c0a52a077a93202b5e3f6728d300943d8972961a.zip |
When using source-file, run the commands in the context of the source-file
command rather than with no context. This makes things like attach work from a
file.
Diffstat (limited to 'usr.bin/tmux/cmd-source-file.c')
-rw-r--r-- | usr.bin/tmux/cmd-source-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-source-file.c b/usr.bin/tmux/cmd-source-file.c index 6193a4fafc7..89a21202299 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.3 2009/07/26 12:58:44 nicm Exp $ */ +/* $OpenBSD: cmd-source-file.c,v 1.4 2009/08/23 17:29:51 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha <me@tiagocunha.org> @@ -90,7 +90,7 @@ cmd_source_file_exec(struct cmd *self, struct cmd_ctx *ctx) struct cmd_source_file_data *data = self->data; char *cause; - if (load_cfg(data->path, &cause) != 0) { + if (load_cfg(data->path, ctx, &cause) != 0) { ctx->error(ctx, "%s", cause); xfree(cause); return (-1); |