=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-new-session.c,v retrieving revision 1.67 retrieving revision 1.68 diff -c -r1.67 -r1.68 *** src/usr.bin/tmux/cmd-new-session.c 2015/06/04 23:27:51 1.67 --- src/usr.bin/tmux/cmd-new-session.c 2015/06/07 21:39:39 1.68 *************** *** 1,4 **** ! /* $OpenBSD: cmd-new-session.c,v 1.67 2015/06/04 23:27:51 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-new-session.c,v 1.68 2015/06/07 21:39:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 37,44 **** const struct cmd_entry cmd_new_session_entry = { "new-session", "new", ! "Ac:dDF:n:Ps:t:x:y:", 0, -1, ! "[-AdDP] [-c start-directory] [-F format] [-n window-name] " "[-s session-name] " CMD_TARGET_SESSION_USAGE " [-x width] " "[-y height] [command]", CMD_STARTSERVER, --- 37,44 ---- const struct cmd_entry cmd_new_session_entry = { "new-session", "new", ! "Ac:dDEF:n:Ps:t:x:y:", 0, -1, ! "[-AdDEP] [-c start-directory] [-F format] [-n window-name] " "[-s session-name] " CMD_TARGET_SESSION_USAGE " [-x width] " "[-y height] [command]", CMD_STARTSERVER, *************** *** 91,97 **** if (session_find(newname) != NULL) { if (args_has(args, 'A')) { return (cmd_attach_session(cmdq, newname, ! args_has(args, 'D'), 0, NULL)); } cmdq_error(cmdq, "duplicate session: %s", newname); return (CMD_RETURN_ERROR); --- 91,98 ---- if (session_find(newname) != NULL) { if (args_has(args, 'A')) { return (cmd_attach_session(cmdq, newname, ! args_has(args, 'D'), 0, NULL, ! args_has(args, 'E'))); } cmdq_error(cmdq, "duplicate session: %s", newname); return (CMD_RETURN_ERROR); *************** *** 230,238 **** /* Construct the environment. */ environ_init(&env); ! update = options_get_string(&global_s_options, "update-environment"); ! if (c != NULL) environ_update(update, &c->environ, &env); /* Create the new session. */ idx = -1 - options_get_number(&global_s_options, "base-index"); --- 231,241 ---- /* Construct the environment. */ environ_init(&env); ! if (c != NULL && !args_has(args, 'E')) { ! update = options_get_string(&global_s_options, ! "update-environment"); environ_update(update, &c->environ, &env); + } /* Create the new session. */ idx = -1 - options_get_number(&global_s_options, "base-index");