only display usable commands in help
authorZachary T Welch <zw@superlucidity.net>
Sun, 29 Nov 2009 22:29:24 +0000 (14:29 -0800)
committerZachary T Welch <zw@superlucidity.net>
Tue, 1 Dec 2009 00:29:24 +0000 (16:29 -0800)
With the ability to defer 'init', users can access the help system while
still in CONFIG mode.  This patch omits commands from the help and usage
list when they cannot be run in the current command mode, making it much
easier to see what can be done at a given time.

src/helper/command.c

index ce857dd6c21c32152f79687dc544bc0d54674228..ac7c8d88b4ef40e6e127a42377305b2d72a41a65 100644 (file)
@@ -872,6 +872,9 @@ static void command_help_show_wrap(const char *str, unsigned n, unsigned n2)
 static COMMAND_HELPER(command_help_show, struct command *c, unsigned n,
                bool show_help)
 {
 static COMMAND_HELPER(command_help_show, struct command *c, unsigned n,
                bool show_help)
 {
+       if (!command_can_run(CMD_CTX, c))
+               return ERROR_OK;
+
        char *cmd_name = command_name(c, ' ');
        if (NULL == cmd_name)
                return -ENOMEM;
        char *cmd_name = command_name(c, ' ');
        if (NULL == cmd_name)
                return -ENOMEM;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)