[RFA 1/2] Add completion for COMMAND in 'thread apply all|ID... COMMAND'
Pedro Alves
palves@redhat.com
Wed May 1 10:18:00 GMT 2019
On 5/1/19 5:53 AM, Philippe Waroquiers wrote:
> On Tue, 2019-04-30 at 09:13 -0600, Tom Tromey wrote:
>>>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
>>>> One example is if the input text is "thread apply all -ascen".
>>>> It seems like this should complete to "-ascending " (with the trailing space).
>>
>> Philippe> Currently, the unpatched GDB HEAD does not complete -ascen.
>> Philippe> I agree it should complete but it does not :(.
>> Philippe> (the GDB behaviour regarding command option syntax is wildly inconsistent).
>>
>> Yeah, what I meant here is that it would be good if the new completion
>> code did this, not that this was something that currently occurred.
> Yes, effectively, the fact that GDB does not complete arguments is surprising
> (while e.g. bash has completion for arguments of almost all commands, such as:
> ls --alm<TAB>
> => ls --almost-all
> :).
>
> I will take a look at how to have completions for command arguments,
> but IMO that is better done as a separate patch to provide a more general
> solution (i.e. not only for commands that are launching other commands,
> which is what this patch is providing).
I'm going to post the "print -OPT" patch soon, which includes a generic
framework for command options, and integrates with completion. It's the
patch that I mentioned to you a while ago when we discussed the "qvcs" flags
patches. I've pushed it to the users/palves/cli-options branch on
sourceware last night, if you guys want to take a look meanwhile. I'd
like to post it for discussion before we decide how to go forward on the
"/" patches. I'm on holiday today, and likely OOO for most of it, so not
sure I'll be able to post it today.
Funny enough, "thread apply all -ascen[TAB]" is one of the options
that I converted to the new scheme in the branch.
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list