This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Difficulty with the readline completion interface in GDB
- From: Chet Ramey <chet at caleb dot ins dot cwru dot edu>
- To: eliz at elta dot co dot il
- Cc: drow at mvista dot com, bug-readline at gnu dot org, gdb at sources dot redhat dot com, chet at po dot cwru dot edu
- Date: Wed, 28 Jan 2004 15:04:29 -0500
- Subject: Re: Difficulty with the readline completion interface in GDB
- Read-receipt-to: chet@po.CWRU.Edu
- References: <20040118224929.GA8226@nevyn.them.org> <uad4kea6b.fsf@elta.co.il>
- Reply-to: chet at po dot CWRU dot Edu
> > 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.
I added the hook: char *(*rl_completion_word_break_hook)(void)
The completion code sets the word break characters from this function's
return value, defaulting to rl_completer_word_break_characters if it is
unset or returns NULL.
This will be in bash-3.0/readline-5.0.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/