mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Do not return error with -q, GitHub issue 3065.
This commit is contained in:
		@@ -103,7 +103,7 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
	name = options_match(argument, &idx, &ambiguous);
 | 
			
		||||
	if (name == NULL) {
 | 
			
		||||
		if (args_has(args, 'q'))
 | 
			
		||||
			goto fail;
 | 
			
		||||
			goto out;
 | 
			
		||||
		if (ambiguous)
 | 
			
		||||
			cmdq_error(item, "ambiguous option: %s", argument);
 | 
			
		||||
		else
 | 
			
		||||
@@ -114,7 +114,7 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
	    &cause);
 | 
			
		||||
	if (scope == OPTIONS_TABLE_NONE) {
 | 
			
		||||
		if (args_has(args, 'q'))
 | 
			
		||||
			goto fail;
 | 
			
		||||
			goto out;
 | 
			
		||||
		cmdq_error(item, "%s", cause);
 | 
			
		||||
		free(cause);
 | 
			
		||||
		goto fail;
 | 
			
		||||
@@ -129,11 +129,12 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
		cmd_show_options_print(self, item, o, idx, parent);
 | 
			
		||||
	else if (*name == '@') {
 | 
			
		||||
		if (args_has(args, 'q'))
 | 
			
		||||
			goto fail;
 | 
			
		||||
			goto out;
 | 
			
		||||
		cmdq_error(item, "invalid option: %s", argument);
 | 
			
		||||
		goto fail;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
out:
 | 
			
		||||
	free(name);
 | 
			
		||||
	free(argument);
 | 
			
		||||
	return (CMD_RETURN_NORMAL);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user