mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Support -c for new-session, based on code from J Raynor.
This commit is contained in:
		@@ -35,7 +35,6 @@ const struct cmd_entry cmd_new_window_entry = {
 | 
			
		||||
	CMD_TARGET_WINDOW_USAGE " [command]",
 | 
			
		||||
	0,
 | 
			
		||||
	NULL,
 | 
			
		||||
	NULL,
 | 
			
		||||
	cmd_new_window_exec
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -103,7 +102,7 @@ cmd_new_window_exec(struct cmd *self, struct cmd_q *cmdq)
 | 
			
		||||
		cmd = options_get_string(&s->options, "default-command");
 | 
			
		||||
	else
 | 
			
		||||
		cmd = args->argv[0];
 | 
			
		||||
	cwd = cmd_get_default_path(cmdq, args_get(args, 'c'));
 | 
			
		||||
	cwd = cmdq_default_path(cmdq, args_get(args, 'c'));
 | 
			
		||||
 | 
			
		||||
	if (idx == -1)
 | 
			
		||||
		idx = -1 - options_get_number(&s->options, "base-index");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user