From: Doug Evans <dje@google.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: pedro@codesourcery.com, gdb-patches@sourceware.org
Subject: Re: [RFA, doc RFA] Add gdb.add_command_alias
Date: Thu, 22 Sep 2011 21:48:00 -0000 [thread overview]
Message-ID: <CADPb22RGqARG7jRT7pvSzfsBGz7kYVZDNht5c_SjXLFsvABZ7Q@mail.gmail.com> (raw)
In-Reply-To: <83boucsb3n.fsf@gnu.org>
On Thu, Sep 22, 2011 at 11:09 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> -* New commands "info macros", and "info definitions" have been added.
>> +* New commands "info macros", and "info definitions",
>> + and "alias" have been added.^^^
>
> Redundant "and".
Blech, I thought I had removed that.
Will fix.
>> +Python scripting language, and the third is defining new aliases of
>> +existing commands. ^^
>
> "for", I think.
Ok.
>> +@node Aliases
>> +@section Creating new spellings of existing commands
>
> Please add here an index entry:
>
> @cindex aliases for commands
Ok.
>> +Define a new alias with the @samp{alias} command.
>
> You can define a new alias with the @samp{alias} command.
Ok.
>> +@item alias [-a] -f FROM -t TO
>> +
>> +@end table
>> +
>> +@samp{-f FROM} and @samp{-t TO} may be specified in either order.
>
> If by "refer" above you mean refer to "-f FROM" etc., then what's
> wrong with
>
> @samp{-f @var{from}}
That works.
>> +The @samp{-f FROM} option specifies the name of an existing command
>> +that is being aliased.
>> +
>> +The @samp{-t TO} option specifies the name of the new alias.
>
> Btw, I'm not sure FROM and TO are a good idea; it's not like you are
> copying something. How about COMMAND and ALIAS instead?
Ok, but then I have to wonder about -f and -t.
-c and -a? [setting aside -a collides with the current -a for abbreviation]
But if you're happy with -f COMMAND -t ALIAS, great.
>> +The @samp{-a} option specifies that the new alias is an abbreviation
>> +of the @samp{FROM} command, and will not appear in help command lists.
>
> Suggest a rewording:
>
> The @samp{-a} option specifies that the new alias is an abbreviation
> of the @samp{FROM} command. Abbreviations are not shown in command
> lists displayed by the @samp{help} command.
Ok.
>> +Note that aliases are different than user-defined commands.
> ^^^^
> "from"
Ok.
>> +Here is an example where we make @samp{elms} an abbreviation of
>> +@samp{elements} in the @samp{set print elements} command.
>> +This is to show that you can make an abbreviation of any part
>> +of a command.
>> +
>> +@smallexample
>> +(gdb) alias -f "set print elements" -t "set print elms"
>> +(gdb) alias -f "show print elements" -t "show print elms"
>
> For didactic purposes, shouldn't these examples use -a?
Ok.
>> +Note that if you are defining an alias of a @samp{set} command,
>> +you also need to define the alias of the corresponding @samp{show}
>> +command, if desired.
>
>
> "Need" and "if desired" are in contradiction. Which is it?
How about if I reword it to:
Note that if you are defining an alias of a @samp{set} command,
and you want to have an alias for the corresponding @samp{show}
command, then you need to define the latter separately.
[i.e. it may be confusing, but it's not a contradiction]
next prev parent reply other threads:[~2011-09-22 18:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-09 19:25 Doug Evans
2011-09-09 21:15 ` Eli Zaretskii
2011-09-13 17:40 ` Doug Evans
2011-09-13 17:47 ` Pedro Alves
2011-09-13 19:15 ` Doug Evans
2011-09-13 19:32 ` Pedro Alves
2011-09-13 21:42 ` Doug Evans
2011-09-21 21:46 ` Doug Evans
2011-09-22 14:08 ` Pedro Alves
2011-09-22 17:45 ` Doug Evans
2011-09-22 18:13 ` Eli Zaretskii
2011-09-22 21:48 ` Doug Evans [this message]
2011-09-23 11:40 ` Eli Zaretskii
2011-09-13 18:49 ` Pedro Alves
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=CADPb22RGqARG7jRT7pvSzfsBGz7kYVZDNht5c_SjXLFsvABZ7Q@mail.gmail.com \
--to=dje@google.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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