diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-01-10 21:28:48 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-01-10 21:28:48 +0000 |
commit | 520c9c15b08c6b5e278d3906423f58074abddab7 (patch) | |
tree | d164c5ff15a24dc068302fa72e04f5c176870bc8 /usr.bin/tmux | |
parent | f684386ad432bb8379442a034bdd389b8e1e9640 (diff) |
unbind-key -a is allowed no arguments.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/cmd-unbind-key.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-unbind-key.c b/usr.bin/tmux/cmd-unbind-key.c index a78998d5408..cddf26b47ea 100644 --- a/usr.bin/tmux/cmd-unbind-key.c +++ b/usr.bin/tmux/cmd-unbind-key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-unbind-key.c,v 1.9 2011/01/04 00:42:47 nicm Exp $ */ +/* $OpenBSD: cmd-unbind-key.c,v 1.10 2011/01/10 21:28:47 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -31,7 +31,7 @@ int cmd_unbind_key_table(struct cmd *, struct cmd_ctx *, int); const struct cmd_entry cmd_unbind_key_entry = { "unbind-key", "unbind", - "acnt:", 1, 1, + "acnt:", 0, 1, "[-acn] [-t key-table] key", 0, NULL, @@ -43,6 +43,8 @@ int cmd_unbind_key_check(struct args *args) { if (args_has(args, 'a') && (args->argc != 0 || args_has(args, 't'))) + return (-1); + if (!args_has(args, 'a') && args->argc != 1) return (-1); return (0); } |