From daec63e5e6eb3390d53f4bf7f8a327df77e46c95 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 27 Aug 2021 17:25:55 +0000 Subject: 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. --- cmd-respawn-window.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd-respawn-window.c') diff --git a/cmd-respawn-window.c b/cmd-respawn-window.c index 4e6dc2a9..9a1a02c9 100644 --- a/cmd-respawn-window.c +++ b/cmd-respawn-window.c @@ -36,7 +36,7 @@ const struct cmd_entry cmd_respawn_window_entry = { .args = { "c:e:kt:", 0, -1, NULL }, .usage = "[-k] [-c start-directory] [-e environment] " - CMD_TARGET_WINDOW_USAGE " [command]", + CMD_TARGET_WINDOW_USAGE " [shell-command]", .target = { 't', CMD_FIND_WINDOW, 0 }, @@ -61,8 +61,7 @@ cmd_respawn_window_exec(struct cmd *self, struct cmdq_item *item) sc.wl = wl; sc.tc = tc; - 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'); -- cgit v1.2.3