This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFC] Patch to add apropos command


Daniel,

I haven't looked at the patch proper (lets leave the implementation
details aside for a moment), but the idea is really nice.

A few weeks ago I posted something about improving the help command. 
Some users were asking for a "help all" command.  My guess is that what
they really want is an apropos, they just intended to do it visually,
but I guess they will be trilled by an apropos command.

Let's see what other people say, by I believe it is a really nice idea.

Fernando


"Daniel Berlin+list.gdb-patches" wrote:
> 
> Attached is a patch that adds a simple, functional, apropos for gdb.
> 
> it searchs all command names and command doc strings (case
> insensitively)
> for the regex ".*<searchstr>.*".
> 
> It's not perfect, error checking is a bit lax, it just does nothing
> when errors happen, rather than print out the error message.
> It's also a little slower than i want it to be.
> But it does search the name and docstring of every command, and
> properly prints out the command and docstrings of the matching ones.
> It also double prints if the name and docstring both match.
> And if we are searching through a prefix, i really should have it
> print out the prefix as well.
> I'm sure i could think of a better regex too.
> 
> But, even given all that, it's pretty useful, even in current form.
> 
> I wanted to get some comments about usefulness before i go extending
> it.
> I'll happily make it do whatever people want.
> 
>   ------------------------------------------------------------------------
> 
>    apropos.diffName: apropos.diff
>                Type: text/x-patch
> 
>   ------------------------------------------------------------------------

-- 
Fernando Nasser
Red Hat, Inc. - Toronto                 E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]