mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		@@ -120,8 +120,13 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
		cdata->item = NULL;
 | 
			
		||||
	memcpy(&cdata->mouse, &shared->mouse, sizeof cdata->mouse);
 | 
			
		||||
 | 
			
		||||
	job_run(shellcmd, s, server_client_get_cwd(item->client, s), NULL,
 | 
			
		||||
	    cmd_if_shell_callback, cmd_if_shell_free, cdata, 0);
 | 
			
		||||
	if (job_run(shellcmd, s, server_client_get_cwd(item->client, s), NULL,
 | 
			
		||||
	    cmd_if_shell_callback, cmd_if_shell_free, cdata, 0) == NULL) {
 | 
			
		||||
		cmdq_error(item, "failed to run command: %s", shellcmd);
 | 
			
		||||
		free(shellcmd);
 | 
			
		||||
		free(cdata);
 | 
			
		||||
		return (CMD_RETURN_ERROR);
 | 
			
		||||
	}
 | 
			
		||||
	free(shellcmd);
 | 
			
		||||
 | 
			
		||||
	if (args_has(args, 'b'))
 | 
			
		||||
 
 | 
			
		||||
@@ -87,6 +87,7 @@ cmd_load_buffer_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
		if (error != 0) {
 | 
			
		||||
			cmdq_error(item, "-: %s", cause);
 | 
			
		||||
			free(cause);
 | 
			
		||||
			free(cdata);
 | 
			
		||||
			return (CMD_RETURN_ERROR);
 | 
			
		||||
		}
 | 
			
		||||
		return (CMD_RETURN_WAIT);
 | 
			
		||||
 
 | 
			
		||||
@@ -102,8 +102,12 @@ cmd_run_shell_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
	if (!args_has(args, 'b'))
 | 
			
		||||
		cdata->item = item;
 | 
			
		||||
 | 
			
		||||
	job_run(cdata->cmd, s, server_client_get_cwd(item->client, s), NULL,
 | 
			
		||||
	    cmd_run_shell_callback, cmd_run_shell_free, cdata, 0);
 | 
			
		||||
	if (job_run(cdata->cmd, s, server_client_get_cwd(item->client, s), NULL,
 | 
			
		||||
	    cmd_run_shell_callback, cmd_run_shell_free, cdata, 0) == NULL) {
 | 
			
		||||
		cmdq_error(item, "failed to run command: %s", cdata->cmd);
 | 
			
		||||
		free(cdata);
 | 
			
		||||
		return (CMD_RETURN_ERROR);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (args_has(args, 'b'))
 | 
			
		||||
		return (CMD_RETURN_NORMAL);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								format.c
									
									
									
									
									
								
							@@ -1102,8 +1102,10 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen,
 | 
			
		||||
				found = xstrdup("");
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		if (format_choose(ptr + 1, &left, &right) != 0)
 | 
			
		||||
		if (format_choose(ptr + 1, &left, &right) != 0) {
 | 
			
		||||
			free(found);
 | 
			
		||||
			goto fail;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (format_true(found))
 | 
			
		||||
			value = format_expand(ft, left);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user