mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Sync OpenBSD patchset 1063:
Add -q option to set-option to turn off info message, from marcel partap.
This commit is contained in:
		@@ -60,8 +60,8 @@ struct options_entry *cmd_set_option_choice(struct cmd *, struct cmd_ctx *,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const struct cmd_entry cmd_set_option_entry = {
 | 
					const struct cmd_entry cmd_set_option_entry = {
 | 
				
			||||||
	"set-option", "set",
 | 
						"set-option", "set",
 | 
				
			||||||
	"agst:uw", 1, 2,
 | 
						"agqst:uw", 1, 2,
 | 
				
			||||||
	"[-agsuw] [-t target-session|target-window] option [value]",
 | 
						"[-agsquw] [-t target-session|target-window] option [value]",
 | 
				
			||||||
	0,
 | 
						0,
 | 
				
			||||||
	NULL,
 | 
						NULL,
 | 
				
			||||||
	NULL,
 | 
						NULL,
 | 
				
			||||||
@@ -70,8 +70,8 @@ const struct cmd_entry cmd_set_option_entry = {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const struct cmd_entry cmd_set_window_option_entry = {
 | 
					const struct cmd_entry cmd_set_window_option_entry = {
 | 
				
			||||||
	"set-window-option", "setw",
 | 
						"set-window-option", "setw",
 | 
				
			||||||
	"agt:u", 1, 2,
 | 
						"agqt:u", 1, 2,
 | 
				
			||||||
	"[-agu] " CMD_TARGET_WINDOW_USAGE " option [value]",
 | 
						"[-agqu] " CMD_TARGET_WINDOW_USAGE " option [value]",
 | 
				
			||||||
	0,
 | 
						0,
 | 
				
			||||||
	NULL,
 | 
						NULL,
 | 
				
			||||||
	NULL,
 | 
						NULL,
 | 
				
			||||||
@@ -175,7 +175,8 @@ cmd_set_option_unset(struct cmd *self, struct cmd_ctx *ctx,
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	options_remove(oo, oe->name);
 | 
						options_remove(oo, oe->name);
 | 
				
			||||||
	ctx->info(ctx, "unset option: %s", oe->name);
 | 
						if (!args_has(args, 'q'))
 | 
				
			||||||
 | 
							ctx->info(ctx, "unset option: %s", oe->name);
 | 
				
			||||||
	return (0);
 | 
						return (0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -184,6 +185,7 @@ int
 | 
				
			|||||||
cmd_set_option_set(struct cmd *self, struct cmd_ctx *ctx,
 | 
					cmd_set_option_set(struct cmd *self, struct cmd_ctx *ctx,
 | 
				
			||||||
    const struct options_table_entry *oe, struct options *oo, const char *value)
 | 
					    const struct options_table_entry *oe, struct options *oo, const char *value)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						struct args		*args = self->args;
 | 
				
			||||||
	struct options_entry	*o;
 | 
						struct options_entry	*o;
 | 
				
			||||||
	const char		*s;
 | 
						const char		*s;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -220,7 +222,8 @@ cmd_set_option_set(struct cmd *self, struct cmd_ctx *ctx,
 | 
				
			|||||||
		return (-1);
 | 
							return (-1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	s = options_table_print_entry(oe, o);
 | 
						s = options_table_print_entry(oe, o);
 | 
				
			||||||
	ctx->info(ctx, "set option: %s -> %s", oe->name, s);
 | 
						if (!args_has(args, 'q'))
 | 
				
			||||||
 | 
							ctx->info(ctx, "set option: %s -> %s", oe->name, s);
 | 
				
			||||||
	return (0);
 | 
						return (0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -229,7 +232,7 @@ struct options_entry *
 | 
				
			|||||||
cmd_set_option_string(struct cmd *self, unused struct cmd_ctx *ctx,
 | 
					cmd_set_option_string(struct cmd *self, unused struct cmd_ctx *ctx,
 | 
				
			||||||
    const struct options_table_entry *oe, struct options *oo, const char *value)
 | 
					    const struct options_table_entry *oe, struct options *oo, const char *value)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct args	*args = self->args;
 | 
						struct args		*args = self->args;
 | 
				
			||||||
	struct options_entry	*o;
 | 
						struct options_entry	*o;
 | 
				
			||||||
	char			*oldval, *newval;
 | 
						char			*oldval, *newval;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								tmux.1
									
									
									
									
									
								
							@@ -1792,7 +1792,7 @@ command.
 | 
				
			|||||||
Commands which set options are as follows:
 | 
					Commands which set options are as follows:
 | 
				
			||||||
.Bl -tag -width Ds
 | 
					.Bl -tag -width Ds
 | 
				
			||||||
.It Xo Ic set-option
 | 
					.It Xo Ic set-option
 | 
				
			||||||
.Op Fl agsuw
 | 
					.Op Fl agqsuw
 | 
				
			||||||
.Op Fl t Ar target-session | Ar target-window
 | 
					.Op Fl t Ar target-session | Ar target-window
 | 
				
			||||||
.Ar option Ar value
 | 
					.Ar option Ar value
 | 
				
			||||||
.Xc
 | 
					.Xc
 | 
				
			||||||
@@ -1820,6 +1820,12 @@ flag unsets an option, so a session inherits the option from the global
 | 
				
			|||||||
options.
 | 
					options.
 | 
				
			||||||
It is not possible to unset a global option.
 | 
					It is not possible to unset a global option.
 | 
				
			||||||
.Pp
 | 
					.Pp
 | 
				
			||||||
 | 
					The
 | 
				
			||||||
 | 
					.Fl q
 | 
				
			||||||
 | 
					flag suppresses the informational message (as if the
 | 
				
			||||||
 | 
					.Ic quiet
 | 
				
			||||||
 | 
					server option was set).
 | 
				
			||||||
 | 
					.Pp
 | 
				
			||||||
Available window options are listed under
 | 
					Available window options are listed under
 | 
				
			||||||
.Ic set-window-option .
 | 
					.Ic set-window-option .
 | 
				
			||||||
.Pp
 | 
					.Pp
 | 
				
			||||||
@@ -2385,7 +2391,7 @@ The default is
 | 
				
			|||||||
.Ql \ -_@ .
 | 
					.Ql \ -_@ .
 | 
				
			||||||
.El
 | 
					.El
 | 
				
			||||||
.It Xo Ic set-window-option
 | 
					.It Xo Ic set-window-option
 | 
				
			||||||
.Op Fl agu
 | 
					.Op Fl agqu
 | 
				
			||||||
.Op Fl t Ar target-window
 | 
					.Op Fl t Ar target-window
 | 
				
			||||||
.Ar option Ar value
 | 
					.Ar option Ar value
 | 
				
			||||||
.Xc
 | 
					.Xc
 | 
				
			||||||
@@ -2393,7 +2399,8 @@ The default is
 | 
				
			|||||||
Set a window option.
 | 
					Set a window option.
 | 
				
			||||||
The
 | 
					The
 | 
				
			||||||
.Fl a ,
 | 
					.Fl a ,
 | 
				
			||||||
.Fl g
 | 
					.Fl g ,
 | 
				
			||||||
 | 
					.Fl q
 | 
				
			||||||
and
 | 
					and
 | 
				
			||||||
.Fl u
 | 
					.Fl u
 | 
				
			||||||
flags work similarly to the
 | 
					flags work similarly to the
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user