Re: [PATCH 2/2] Allow check-mark to be changed for CLI

Eli Zaretskii
2025-05-10T06:24:08Z

> From: Tom Tromey <tromey@adacore.com>
> Date: Fri, 09 May 2025 14:18:51 -0600
> Cc: Tom Tromey <tromey@adacore.com>
>
> In keeping with the emojification of gdb, this patch changes the
> default "current" marker to be a check-mark. It adds a knob to allow
> the character to be changed, and, as always, reverts to the old output
> when emojis are disabled.
> ---
> gdb/NEWS | 6 ++++++
> gdb/cli-out.c | 8 ++++++++
> gdb/cli-out.h | 2 ++
> gdb/cli/cli-style.c | 32 ++++++++++++++++++++++++++++++++
> gdb/cli/cli-style.h | 3 +++
> gdb/doc/gdb.texinfo | 10 ++++++++++
> gdb/testsuite/gdb.base/style.exp | 4 ++++
> 7 files changed, 65 insertions(+)

Thanks.

> diff --git a/gdb/NEWS b/gdb/NEWS
> index a82b7e3342c57b9b066e9012c5a961ad6ba839f0..07e72833a269ffe0ab034d4c4ea8b185ad217983 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -78,6 +78,12 @@ set style error-prefix STRING
> with emoji display, and so the prefixes are only displayed if emoji
> styling is enabled.
>
> +set style check-mark STRING
> + Set the string that is used to indicate the "current" row when a
> + table is printed by the CLI. This functionality is intended for use
> + with emoji display, and so the prefixes are only displayed if emoji
> + styling is enabled.

This part is okay.

> + add_setshow_string_cmd ("check-mark", no_class,
> + &check_mark,
> + _("Set the check mark text."),
> + _("Show the check mark text."),

I suggest

Set the check-mark string.\n\
Check-mark is the string used to indicate the current line in a table.

> +@item set style check-mark @var{string}
> +@itemx show style check-mark
> +These commands control the string that the CLI uses to indicate which
> +line in a table indicates the current state of @value{GDBN}. For
> +example, this would be used to indicate the current thread in the
> +output of @samp{info threads}. This functionality is intended for use
> +with emoji display, and so the chosen string only displayed if emoji
^^^
"is" is missing there.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>