|PatchSet 882

|Date: 2011/04/05 20:37:01
|Author: nicm
|Branch: HEAD
|Tag: (none)
|Log:
|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@.
This commit is contained in:
Nicholas Marriott
2011-04-06 22:24:01 +00:00
parent ae5954d30a
commit 4e452a2e11
18 changed files with 65 additions and 48 deletions

View File

@ -1,4 +1,4 @@
/* $Id: cmd-set-environment.c,v 1.4 2011-01-07 14:45:34 tcunha Exp $ */
/* $Id: cmd-set-environment.c,v 1.5 2011-04-06 22:24:01 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@ -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;
}