Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add completion styling
Date: Sat, 23 May 2020 23:48:20 +0200	[thread overview]
Message-ID: <de4f65c436e9af01e552bbfd2b37cccd294d7749.camel@skynet.be> (raw)
In-Reply-To: <87a71ytlue.fsf@tromey.com>

On Sat, 2020-05-23 at 14:52 -0600, Tom Tromey wrote:
> > > > > > "Tom" == Tom Tromey <tom@tromey.com> writes:
> 
> Tom> I think the Emacs idea is nice.  Maybe we want to let the user control
> Tom> the prefix text, the "difference character", and the final completion
> Tom> text.
> 
> > Here's a new version of the patch that implements this idea.
> 
> I'm checking this in.
I played with it, nice.

A suggestion:
If easy to do, it would be nice to also have coloring in the ambiguous output:
  (gdb) di
  Ambiguous command "di": directory, dis, disa, disable, disassemble, disconnect, display.
(but I guess this might not be easy if the coloring is done by readline,
and the ambiguous list is produced by GDB).

Another suggestion:
I am wondering why completion-difference is not used to color the full set
of characters needed to make a command non-ambiguous.

For example, when completing <di>, it would be nice to color <sc> of disconnect
and color <sp> of display, <sas> of disassemble, ....

The idea is to show what must be typed specifically to have this command,
rather than show one letter but still giving something ambiguous needing
further completion.

Currently, only the 3rd letter is colored: 
e.g.<s> is colored, but it implies then to type <s> then tab
then <c> (and maybe tab again if you want to be sure) before having the command
you want.

Philippe




  reply	other threads:[~2020-05-23 21:48 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
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 [this message]
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=de4f65c436e9af01e552bbfd2b37cccd294d7749.camel@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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