Support -c for new-session, based on code from J Raynor.

This commit is contained in:
nicm
2013-10-10 12:07:36 +00:00
parent fc54bfe6b0
commit b822d24b15
5 changed files with 67 additions and 49 deletions

View File

@ -38,7 +38,6 @@ const struct cmd_entry cmd_split_window_entry = {
CMD_TARGET_PANE_USAGE " [command]",
0,
cmd_split_window_key_binding,
NULL,
cmd_split_window_exec
};
@ -84,7 +83,7 @@ cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq)
cmd = options_get_string(&s->options, "default-command");
else
cmd = args->argv[0];
cwd = cmd_get_default_path(cmdq, args_get(args, 'c'));
cwd = cmdq_default_path(cmdq, args_get(args, 'c'));
type = LAYOUT_TOPBOTTOM;
if (args_has(args, 'h'))