diff options
author | nicm <nicm> | 2021-08-27 17:25:55 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-08-27 17:25:55 +0000 |
commit | daec63e5e6eb3390d53f4bf7f8a327df77e46c95 (patch) | |
tree | cf78624cb0b4a80a6eeb8e29b368ea4f9beb5610 /cmd-new-session.c | |
parent | fd756a150b43d319d08ac4117f34edef9e0438c4 (diff) | |
download | rtmux-daec63e5e6eb3390d53f4bf7f8a327df77e46c95.tar.gz rtmux-daec63e5e6eb3390d53f4bf7f8a327df77e46c95.tar.bz2 rtmux-daec63e5e6eb3390d53f4bf7f8a327df77e46c95.zip |
Replace %% in command lists (by copying them) for template arguments ,
this means they can be used with {} as well. Also make argument
processing from an existing vector preserve commands. GitHub issue 2858.
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r-- | cmd-new-session.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c index 93c7e7b4..cb9abfb3 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -42,7 +42,8 @@ const struct cmd_entry cmd_new_session_entry = { .args = { "Ac:dDe:EF:f:n:Ps:t:x:Xy:", 0, -1, NULL }, .usage = "[-AdDEPX] [-c start-directory] [-e environment] [-F format] " "[-f flags] [-n window-name] [-s session-name] " - CMD_TARGET_SESSION_USAGE " [-x width] [-y height] [command]", + CMD_TARGET_SESSION_USAGE " [-x width] [-y height] " + "[shell-command]", .target = { 't', CMD_FIND_SESSION, CMD_FIND_CANFAIL }, @@ -283,7 +284,7 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) sc.tc = c; sc.name = args_get(args, 'n'); - args_vector(args, &sc.argc, &sc.argv); + args_to_vector(args, &sc.argc, &sc.argv); sc.idx = -1; sc.cwd = args_get(args, 'c'); |