Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@elta.co.il>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: bug-readline@gnu.org, gdb@sources.redhat.com
Subject: Re: Difficulty with the readline completion interface in GDB
Date: Mon, 19 Jan 2004 06:14:00 -0000	[thread overview]
Message-ID: <uad4kea6b.fsf@elta.co.il> (raw)
In-Reply-To: <20040118224929.GA8226@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 18 Jan 2004 17:49:29 -0500)

> Date: Sun, 18 Jan 2004 17:49:29 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
> 
> I've spent this morning trying to fix a long-standing bug in GDB's tab
> completion.  I think it's unsolvable with the current readline interface

Agreed.  This has come up before on GDB mailing lists, see, for example:

   http://sources.redhat.com/ml/gdb/2001-09/msg00247.html

> There's a lot of possible solutions.  There could be a hook called before
> rl_complete generates the matches list, which could fudge the complete
> characters - most direct solution, not very elegant.  A function could be
> called to get the list of complete characters, which would then be sensitive
> to rl_point - not sure what other issues this could cause.  The filename
> completion code could search backwards according to the list of filename
> wordbreak characters; this would solve the specific problem but not the
> more general one.  Probably there are others.

I think the first solution is the easiest one and will do the job.

The two others need to teach GDB functions dealing with completion too
much context, which they are currently oblivious about.  For example,
the back-search method in the last proposal is not easy since you not
always know where to stop the search (e.g., imagine a GDB command that
has 2 file-name arguments, or the "foo.c:bar" case).  It's not so hard
to scan forward from some place, but much harder to scan backward.

What is inelegant in the first solution you suggested, Daniel?


  reply	other threads:[~2004-01-19  6:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-18 22:49 Daniel Jacobowitz
2004-01-19  6:14 ` Eli Zaretskii [this message]
2004-01-28 20:09   ` Chet Ramey
2004-01-28 20:17     ` Daniel Jacobowitz
2004-01-29 23:33       ` Elena Zannoni

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=uad4kea6b.fsf@elta.co.il \
    --to=eliz@elta.co.il \
    --cc=bug-readline@gnu.org \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.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