Add cmdq as an argument to format_create and add a format for the

command name (will also be used for more later).
This commit is contained in:
nicm
2015-12-11 12:27:36 +00:00
parent e0f26dcda3
commit 01831da5f5
23 changed files with 32 additions and 28 deletions

View File

@ -119,7 +119,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
/* Get the new session working directory. */
to_free = NULL;
if (args_has(args, 'c')) {
ft = format_create(0);
ft = format_create(cmdq, 0);
format_defaults(ft, cmd_find_client(cmdq, NULL, 1), NULL, NULL,
NULL);
to_free = cwd = format_expand(ft, args_get(args, 'c'));
@ -283,7 +283,7 @@ cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
if ((template = args_get(args, 'F')) == NULL)
template = NEW_SESSION_TEMPLATE;
ft = format_create(0);
ft = format_create(cmdq, 0);
format_defaults(ft, cmd_find_client(cmdq, NULL, 1), s, NULL,
NULL);