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-respawn-pane.c | |
parent | fd756a150b43d319d08ac4117f34edef9e0438c4 (diff) |
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-respawn-pane.c')
-rw-r--r-- | cmd-respawn-pane.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmd-respawn-pane.c b/cmd-respawn-pane.c index 652ef755..6d60002e 100644 --- a/cmd-respawn-pane.c +++ b/cmd-respawn-pane.c @@ -36,7 +36,7 @@ const struct cmd_entry cmd_respawn_pane_entry = { .args = { "c:e:kt:", 0, -1, NULL }, .usage = "[-k] [-c start-directory] [-e environment] " - CMD_TARGET_PANE_USAGE " [command]", + CMD_TARGET_PANE_USAGE " [shell-command]", .target = { 't', CMD_FIND_PANE, 0 }, @@ -61,10 +61,8 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmdq_item *item) sc.wl = wl; sc.wp0 = wp; - sc.lc = NULL; - sc.name = NULL; - args_vector(args, &sc.argc, &sc.argv); + args_to_vector(args, &sc.argc, &sc.argv); sc.environ = environ_create(); av = args_first_value(args, 'e'); |