summaryrefslogtreecommitdiffstats
path: root/cmd-set-environment.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-04-05 19:37:01 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-04-05 19:37:01 +0000
commit5d519ba526feffb08003e2c11c7230a6f2cc1d9e (patch)
tree446bc8a565b04861e848231e7d25dd49b1c96d8f /cmd-set-environment.c
parentf16ea60cc0eceeb1e0bd580129d99aff4423ec19 (diff)
Add a flag to cmd_find_session so that attach-session can prefer
unattached sessions when choosing the most recently used (if -t is not given). Suggested by claudio@.
Diffstat (limited to 'cmd-set-environment.c')
-rw-r--r--cmd-set-environment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-set-environment.c b/cmd-set-environment.c
index 3075fb07..b43de458 100644
--- a/cmd-set-environment.c
+++ b/cmd-set-environment.c
@@ -65,7 +65,7 @@ cmd_set_environment_exec(struct cmd *self, struct cmd_ctx *ctx)
if (args_has(self->args, 'g'))
env = &global_environ;
else {
- if ((s = cmd_find_session(ctx, args_get(args, 't'))) == NULL)
+ if ((s = cmd_find_session(ctx, args_get(args, 't'), 0)) == NULL)
return (-1);
env = &s->environ;
}