diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-05-17 14:01:08 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-05-17 14:01:08 -0400 |
commit | 14b42fc4a0edc412e02a6c9cfe7eb48e67da3145 (patch) | |
tree | 21dc1064114f57a24740462b0f30a2c5ca581635 /gdb/completer.c | |
parent | ecd0a6b35d32aa6aca913e2d0348cfdf7e78d6c3 (diff) | |
download | gdb-14b42fc4a0edc412e02a6c9cfe7eb48e67da3145.zip gdb-14b42fc4a0edc412e02a6c9cfe7eb48e67da3145.tar.gz gdb-14b42fc4a0edc412e02a6c9cfe7eb48e67da3145.tar.bz2 |
gdb: rename cmd_list_element::prefixlist to subcommands
While browsing this code, I found the name "prefixlist" really
confusing. I kept reading it as "list of prefixes". Which it isn't:
it's a list of sub-commands, for a prefix command. I think that
renaming it to "subcommands" would make things clearer.
gdb/ChangeLog:
* Rename "prefixlist" parameters to "subcommands" throughout.
* cli/cli-decode.h (cmd_list_element) <prefixlist>: Rename to...
<subcommands>: ... this.
* cli/cli-decode.c (lookup_cmd_for_prefixlist): Rename to...
(lookup_cmd_with_subcommands): ... this.
Change-Id: I150da10d03052c2420aa5b0dee41f422e2a97928
Diffstat (limited to 'gdb/completer.c')
-rw-r--r-- | gdb/completer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/completer.c b/gdb/completer.c index 80e8c7b..6d39435 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -1428,7 +1428,7 @@ complete_line_internal_1 (completion_tracker &tracker, if (result_list) { if (reason != handle_brkchars) - complete_on_cmdlist (*result_list->prefixlist, tracker, p, + complete_on_cmdlist (*result_list->subcommands, tracker, p, word, ignore_help_classes); } else @@ -1456,12 +1456,12 @@ complete_line_internal_1 (completion_tracker &tracker, { /* The command is followed by whitespace; we need to complete on whatever comes after command. */ - if (c->prefixlist) + if (c->subcommands) { /* It is a prefix command; what comes after it is a subcommand (e.g. "info "). */ if (reason != handle_brkchars) - complete_on_cmdlist (*c->prefixlist, tracker, p, word, + complete_on_cmdlist (*c->subcommands, tracker, p, word, ignore_help_classes); /* Ensure that readline does the right thing @@ -1524,7 +1524,7 @@ complete_line_internal_1 (completion_tracker &tracker, { /* There is non-whitespace beyond the command. */ - if (c->prefixlist && !c->allow_unknown) + if (c->subcommands && !c->allow_unknown) { /* It is an unrecognized subcommand of a prefix command, e.g. "info adsfkdj". */ |