From e08b963ada5689eb4ee68ead01f6719503c18c57 Mon Sep 17 00:00:00 2001 From: Aswin C Date: Tue, 13 Oct 2020 17:57:36 +0530 Subject: [PATCH] Improve help under `v?` ##cons (#17743) --- libr/core/cmd.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libr/core/cmd.c b/libr/core/cmd.c index fcf3b37a1a..f921f51c4b 100644 --- a/libr/core/cmd.c +++ b/libr/core/cmd.c @@ -339,6 +339,15 @@ static const char *help_msg_vertical_bar[] = { NULL }; +static const char *help_msg_v[] = { + "Usage:", "v[*i]", "", + "v", "", "open visual panels", + "v", " test", "load saved layout with name test", + "v=", " test", "save current layout with name test", + "vi", " test", "open the file test in 'cfg.editor'", + NULL +}; + R_API void r_core_cmd_help(const RCore *core, const char *help[]) { r_cons_cmd_help (help, core->print->flags & R_PRINT_FLAGS_COLOR); } @@ -1897,10 +1906,7 @@ static int cmd_panels(void *data, const char *input) { return false; } if (*input == '?') { - eprintf ("Usage: v[*i]\n"); - eprintf ("v.test # save current layout with name test\n"); - eprintf ("v test # load saved layout with name test\n"); - eprintf ("vi ... # launch 'cfg.editor'\n"); + r_core_cmd_help (core, help_msg_v); return false; } if (!r_cons_is_interactive ()) {