mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	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.
			
			
This commit is contained in:
		@@ -40,7 +40,7 @@ const struct cmd_entry cmd_new_window_entry = {
 | 
			
		||||
 | 
			
		||||
	.args = { "abc:de:F:kn:PSt:", 0, -1, NULL },
 | 
			
		||||
	.usage = "[-abdkPS] [-c start-directory] [-e environment] [-F format] "
 | 
			
		||||
		 "[-n window-name] " CMD_TARGET_WINDOW_USAGE " [command]",
 | 
			
		||||
		 "[-n window-name] " CMD_TARGET_WINDOW_USAGE " [shell-command]",
 | 
			
		||||
 | 
			
		||||
	.target = { 't', CMD_FIND_WINDOW, CMD_FIND_WINDOW_INDEX },
 | 
			
		||||
 | 
			
		||||
@@ -105,7 +105,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
	sc.tc = tc;
 | 
			
		||||
 | 
			
		||||
	sc.name = args_get(args, 'n');
 | 
			
		||||
	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');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user