aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-12-03 17:44:02 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-12-03 17:44:02 +0000
commit6c9862662fd2cccdc55be9d447a27b10f33ed8ea (patch)
treedc4e67793ad8556b91448ab61599bdb5e78c3e41 /status.c
parent6bbc92a6f5799f0c3d9ce4fc8c10c161598757be (diff)
downloadrtmux-6c9862662fd2cccdc55be9d447a27b10f33ed8ea.tar.gz
rtmux-6c9862662fd2cccdc55be9d447a27b10f33ed8ea.tar.bz2
rtmux-6c9862662fd2cccdc55be9d447a27b10f33ed8ea.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 'status.c')
-rw-r--r--status.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/status.c b/status.c
index fa452d53..bc8dc716 100644
--- a/status.c
+++ b/status.c
@@ -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. */