summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-07-27 08:45:46 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-07-27 08:45:46 +0000
commit501b8aa7e063da496eacab26a2592c2b33516190 (patch)
tree8f0376f52ea79765b8c7f7e2e6350d08934aa7de /usr.bin
parent17b09a5e7cd29533721c5416d2699650be27858f (diff)
Make -q suppress ambiguous option warnings too, from Cam Hutchison.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/cmd-set-option.c9
-rw-r--r--usr.bin/tmux/tmux.18
2 files changed, 10 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c
index 980c10edcfc..6d7b072233a 100644
--- a/usr.bin/tmux/cmd-set-option.c
+++ b/usr.bin/tmux/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-option.c,v 1.75 2015/06/04 14:29:33 nicm Exp $ */
+/* $OpenBSD: cmd-set-option.c,v 1.76 2015/07/27 08:45:45 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -110,8 +110,11 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq)
/* Find the option entry, try each table. */
table = oe = NULL;
if (options_table_find(optstr, &table, &oe) != 0) {
- cmdq_error(cmdq, "ambiguous option: %s", optstr);
- return (CMD_RETURN_ERROR);
+ if (!args_has(args, 'q')) {
+ cmdq_error(cmdq, "ambiguous option: %s", optstr);
+ return (CMD_RETURN_ERROR);
+ }
+ return (CMD_RETURN_NORMAL);
}
if (oe == NULL) {
if (!args_has(args, 'q')) {
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index b891b0d4d88..7e8d8139de7 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.445 2015/07/20 15:50:04 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.446 2015/07/27 08:45:45 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 20 2015 $
+.Dd $Mdocdate: July 27 2015 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -2322,9 +2322,9 @@ restores a global option to the default).
.Pp
The
.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
-flag suppresses errors about unknown options.
+flag suppresses errors about unknown or ambiguous options.
.Pp
With
.Fl a ,