help: fix line size in 'usage' output
commitbfce4b41d15e8983eab49c9fc1aab5fb169c602a
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 27 Mar 2021 21:23:50 +0000 (27 22:23 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 29 May 2021 20:35:06 +0000 (29 21:35 +0100)
tree946c087926076ffc16b02ff6a3f8af981fd3adcb
parenta40cbd85e08df2c87b200c6053c2a608f3bc16e6
help: fix line size in 'usage' output

The implementation of command 'usage' is broken while checking the
line limit of 76 chars per line (e.g. 'usage load_image') and the
line wrapping is not correct. The same broken code is used for the
first output line of command 'help' too.

When call command_help_show_wrap(), include the command's name in
the string so the whole text would be wrapped.

Change-Id: Idece01ce54994db7e851d8522435ff764b11f3ac
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6223
Tested-by: jenkins
src/helper/command.c