diff options
author | 2009-12-03 17:44:02 +0000 | |
---|---|---|
committer | 2009-12-03 17:44:02 +0000 | |
commit | f652fcc963640d3da439fa9df0f8fb0e12ef93f8 (patch) | |
tree | 9356de4ad4b1a19a960b9203f340a713c449dc6e /usr.bin/tmux/status.c | |
parent | prevent a completion interrupt pulling io of the buf queue and shoving it (diff) | |
download | wireguard-openbsd-f652fcc963640d3da439fa9df0f8fb0e12ef93f8.tar.xz wireguard-openbsd-f652fcc963640d3da439fa9df0f8fb0e12ef93f8.zip |
Eliminate duplicate code and ease the passage for server-wide options by adding
a -w flag to set-option and show-options and making setw and showw aliases to
set -w and show -w.
Note: setw and showw are still there, but now aliases for set -w and show -w.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r-- | usr.bin/tmux/status.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 5cfb8d8fbb8..d6c893bdea8 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.53 2009/11/26 22:28:24 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.54 2009/12/03 17:44:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1115,7 +1115,7 @@ char * status_prompt_complete(const char *s) { const struct cmd_entry **cmdent; - const struct set_option_entry *optent; + const struct set_option_entry *entry; ARRAY_DECL(, const char *) list; char *prefix, *s2; u_int i; @@ -1130,13 +1130,13 @@ status_prompt_complete(const char *s) if (strncmp((*cmdent)->name, s, strlen(s)) == 0) ARRAY_ADD(&list, (*cmdent)->name); } - for (optent = set_option_table; optent->name != NULL; optent++) { - if (strncmp(optent->name, s, strlen(s)) == 0) - ARRAY_ADD(&list, optent->name); + for (entry = set_session_option_table; entry->name != NULL; entry++) { + if (strncmp(entry->name, s, strlen(s)) == 0) + ARRAY_ADD(&list, entry->name); } - for (optent = set_window_option_table; optent->name != NULL; optent++) { - if (strncmp(optent->name, s, strlen(s)) == 0) - ARRAY_ADD(&list, optent->name); + for (entry = set_window_option_table; entry->name != NULL; entry++) { + if (strncmp(entry->name, s, strlen(s)) == 0) + ARRAY_ADD(&list, entry->name); } /* If none, bail now. */ |