version 1.68, 2010/12/30 23:16:18 |
version 1.69, 2011/01/01 16:51:21 |
|
|
char * |
char * |
status_prompt_complete(const char *s) |
status_prompt_complete(const char *s) |
{ |
{ |
const struct cmd_entry **cmdent; |
const struct cmd_entry **cmdent; |
const struct set_option_entry *entry; |
const struct options_table_entry *oe; |
ARRAY_DECL(, const char *) list; |
ARRAY_DECL(, const char *) list; |
char *prefix, *s2; |
char *prefix, *s2; |
u_int i; |
u_int i; |
size_t j; |
size_t j; |
|
|
if (*s == '\0') |
if (*s == '\0') |
return (NULL); |
return (NULL); |
|
|
if (strncmp((*cmdent)->name, s, strlen(s)) == 0) |
if (strncmp((*cmdent)->name, s, strlen(s)) == 0) |
ARRAY_ADD(&list, (*cmdent)->name); |
ARRAY_ADD(&list, (*cmdent)->name); |
} |
} |
for (entry = set_option_table; entry->name != NULL; entry++) { |
for (oe = server_options_table; oe->name != NULL; oe++) { |
if (strncmp(entry->name, s, strlen(s)) == 0) |
if (strncmp(oe->name, s, strlen(s)) == 0) |
ARRAY_ADD(&list, entry->name); |
ARRAY_ADD(&list, oe->name); |
} |
} |
for (entry = set_session_option_table; entry->name != NULL; entry++) { |
for (oe = session_options_table; oe->name != NULL; oe++) { |
if (strncmp(entry->name, s, strlen(s)) == 0) |
if (strncmp(oe->name, s, strlen(s)) == 0) |
ARRAY_ADD(&list, entry->name); |
ARRAY_ADD(&list, oe->name); |
} |
} |
for (entry = set_window_option_table; entry->name != NULL; entry++) { |
for (oe = window_options_table; oe->name != NULL; oe++) { |
if (strncmp(entry->name, s, strlen(s)) == 0) |
if (strncmp(oe->name, s, strlen(s)) == 0) |
ARRAY_ADD(&list, entry->name); |
ARRAY_ADD(&list, oe->name); |
} |
} |
|
|
/* If none, bail now. */ |
/* If none, bail now. */ |