mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Make -q suppress ambiguous option warnings too, from Cam Hutchison.
This commit is contained in:
		@@ -110,9 +110,12 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq)
 | 
				
			|||||||
	/* Find the option entry, try each table. */
 | 
						/* Find the option entry, try each table. */
 | 
				
			||||||
	table = oe = NULL;
 | 
						table = oe = NULL;
 | 
				
			||||||
	if (options_table_find(optstr, &table, &oe) != 0) {
 | 
						if (options_table_find(optstr, &table, &oe) != 0) {
 | 
				
			||||||
 | 
							if (!args_has(args, 'q')) {
 | 
				
			||||||
			cmdq_error(cmdq, "ambiguous option: %s", optstr);
 | 
								cmdq_error(cmdq, "ambiguous option: %s", optstr);
 | 
				
			||||||
			return (CMD_RETURN_ERROR);
 | 
								return (CMD_RETURN_ERROR);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							return (CMD_RETURN_NORMAL);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if (oe == NULL) {
 | 
						if (oe == NULL) {
 | 
				
			||||||
		if (!args_has(args, 'q')) {
 | 
							if (!args_has(args, 'q')) {
 | 
				
			||||||
			cmdq_error(cmdq, "unknown option: %s", optstr);
 | 
								cmdq_error(cmdq, "unknown option: %s", optstr);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tmux.1
									
									
									
									
									
								
							@@ -2322,9 +2322,9 @@ restores a global option to the default).
 | 
				
			|||||||
.Pp
 | 
					.Pp
 | 
				
			||||||
The
 | 
					The
 | 
				
			||||||
.Fl o
 | 
					.Fl o
 | 
				
			||||||
flag prevents setting an option that is already set and
 | 
					flag prevents setting an option that is already set and the
 | 
				
			||||||
.Fl q
 | 
					.Fl q
 | 
				
			||||||
flag suppresses errors about unknown options.
 | 
					flag suppresses errors about unknown or ambiguous options.
 | 
				
			||||||
.Pp
 | 
					.Pp
 | 
				
			||||||
With
 | 
					With
 | 
				
			||||||
.Fl a ,
 | 
					.Fl a ,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user