completion regression? [PATCH]
Nick Roberts
nickrob@snap.net.nz
Wed Oct 11 23:59:00 GMT 2006
> Nope, sorry. With this patch applied:
>
> (gdb) file .<tab><tab>
> ..// .//
I see.
> Readline defines the interface for these functions, and that says we
> shouldn't include the slash. I think this happens in
> readline/complete.c:print_filename. Maybe there's somewhere else in
> GDB you can do this without breaking CLI tab completion?
Completion via the complete command doesn't use print_filename which is
presumably why there is no trailing slash in this case. I was just trying
to mimic it elsewhere.
I can get it to work by adding an argument to filename_completer:
filename_completer (char *text, char *word, int slash)
and complete_line and doing:
list = complete_line (text, line_buffer, point, 0);
from line_completion_function for completion through TAB
and:
completions = complete_line (point, arg, argpoint, 1);
from complete_command for Emacs.
It involves a lot of changes though because all the other completers need
an extra (unused) argument too.
Perhaps complete_command can be made to use print_filename.
--
Nick http://www.inet.net.nz/~nickrob
More information about the Gdb-patches
mailing list