From: Tom Tromey <tom@tromey.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Add completion styling
Date: Fri, 24 Apr 2020 13:51:54 -0600 [thread overview]
Message-ID: <87eesc1x2d.fsf@tromey.com> (raw)
In-Reply-To: <83369dp3gy.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Apr 2020 09:39:41 +0300")
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Thanks for your comments.
>> Readline has a styling feature for completion -- if it is enabled, the
>> common prefix of completions will be displayed in a different style.
>> This doesn't work in gdb, because gdb implements its own completer.
>>
>> This patch implements the feature. However, it doesn't directly use
>> the Readline feature, because gdb can do a bit better: it can let the
>> user control the styling using the existing mechanisms.
Eli> Would it make sense to default to the style determined by the user's
Eli> colored-completion-prefix setting?
That's a bit of a pain because readline parses LS_COLORS on its own.
This doesn't seem to be documented anywhere. I'm reluctant to try to
use readline's code, because it is using "_" prefixes; in readline these
indicate private items and there's at least one bug report about this in
bugzilla already (some distro made these hidden in the .so and it broke
gdb).
Eli> Also, do we want the default styling to be no-styling, or do we want
Eli> something else?
I would prefer to enable it by default. It's easy to disable if one
prefers.
Eli> Btw, Emacs solves this problem differently: it uses a distinct styling
Eli> for the first character that distinguishes between completion
Eli> candidates. I wonder if that idea is more useful for quickly
Eli> realizing what one needs to type next. Or do we want to follow
Eli> Readline here for consistency reasons?
I think the Emacs idea is nice. Maybe we want to let the user control
the prefix text, the "difference character", and the final completion
text.
Tom
next prev parent reply other threads:[~2020-04-24 19:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 2:41 Tom Tromey
2020-04-09 6:39 ` Eli Zaretskii
2020-04-24 19:51 ` Tom Tromey [this message]
2020-04-24 20:00 ` Eli Zaretskii
2020-04-24 20:37 ` Tom Tromey
2020-05-16 19:18 ` Tom Tromey
2020-05-16 19:25 ` Eli Zaretskii
2020-05-23 20:52 ` Tom Tromey
2020-05-23 21:48 ` Philippe Waroquiers
2020-05-24 0:26 ` Hannes Domani
2020-05-24 10:16 ` Tom de Vries
2020-05-25 8:06 ` Tom de Vries
2020-05-24 14:54 ` Tom Tromey
2020-05-24 12:58 ` Pedro Alves
2020-05-24 14:42 ` Eli Zaretskii
2020-05-24 15:30 ` Pedro Alves
2020-05-24 16:29 ` Eli Zaretskii
2020-05-24 16:44 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eesc1x2d.fsf@tromey.com \
--to=tom@tromey.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).