Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>,
	Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFA] Allow to document user-defined aliases.
Date: Sun, 07 Aug 2022 21:14:03 +0200	[thread overview]
Message-ID: <32ec0c63ee0db07f5b94faf547f2ec2792b2c827.camel@skynet.be> (raw)
In-Reply-To: <87v8r7g6wc.fsf@tromey.com>

On Thu, 2022-08-04 at 13:12 -0600, Tom Tromey wrote:
> > > > > > "Philippe" == Philippe Waroquiers via Gdb-patches <gdb-patches@sourceware.org>
> > > > > > writes:
> 
> Philippe> When using 'help ALIASNAME', GDB shows the help of the aliased command.
> Philippe> This is a good default behaviour.
> 
> Philippe> However, GDB alias command allows to define aliases with arguments
> Philippe> possibly changing or tuning significantly the behaviour of
> Philippe> the aliased command.  In such a case, showing the help of the aliased
> Philippe> command might not be ideal.
> [...]
> Philippe> When a user-defined alias is documented specifically, help and apropos
> Philippe> use the provided alias documentation instead of the documentation of
> Philippe> the aliased command.
> 
> This makes sense to me.  My perspective is that the way a command is
> defined (there are 4 or 5 ways now) isn't as important as what it does,
> and users are normally interested in the latter.
Ok, let's start on this basis.
In any case, if one day, we really still want to make an alias appear
in the list of aliases of the aliased command, we can add an option
to the alias command such as:
  -l  list this alias in the aliased command help even if it has its own documentation.

> 
> One question I have is whether there is any way to see how the command
> is defined, if it is documented.  For  commands  using "define" there is
> "show user-defined"... perhaps that ought to be made to work with
> aliases as well.

The command 'help aliases' show the user defined aliases.
However, I think that when doing 'help for-a-user-documented-alias',
it would be better to still show the alias definition.

I will produce an RFA v2 with the above change, and also fixing the comments
you have given in the other mail.

Thanks for the review.

Philippe




  reply	other threads:[~2022-08-07 19:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25  4:11 Philippe Waroquiers via Gdb-patches
2022-07-25 11:24 ` Eli Zaretskii via Gdb-patches
2022-07-25 20:35   ` Philippe Waroquiers via Gdb-patches
2022-07-26 11:00     ` Eli Zaretskii via Gdb-patches
2022-08-04 19:12 ` Tom Tromey
2022-08-07 19:14   ` Philippe Waroquiers via Gdb-patches [this message]
2022-08-04 19:13 ` Tom Tromey

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=32ec0c63ee0db07f5b94faf547f2ec2792b2c827.camel@skynet.be \
    --to=gdb-patches@sourceware.org \
    --cc=philippe.waroquiers@skynet.be \
    --cc=tom@tromey.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