From: Eli Zaretskii <eliz@gnu.org>
To: Doug Evans <dje@google.com>
Cc: pedro@codesourcery.com, gdb-patches@sourceware.org
Subject: Re: [RFA, doc RFA] Add gdb.add_command_alias
Date: Thu, 22 Sep 2011 18:13:00 -0000 [thread overview]
Message-ID: <83boucsb3n.fsf@gnu.org> (raw)
In-Reply-To: <CADPb22SVb=CB4O--VttPknOHu56vSKFNzeMeUY4tMO1=CvqSJQ@mail.gmail.com>
> Date: Wed, 21 Sep 2011 14:12:11 -0700
> From: Doug Evans <dje@google.com>
>
> @item alias [-a] -f @var{from} -t @var{to}
>
> instead of what I've written:
>
> @item alias [-a] -f FROM -t TO
>
> But I don't know how to properly refer to -f from in subsequent text
> except as @samp{-f FROM} which is why I wrote what I wrote.
> Suggestions welcome.
Sorry, I don't understand the problem. Or maybe I do, see below.
> -* New commands "info macros", and "info definitions" have been added.
> +* New commands "info macros", and "info definitions",
> + and "alias" have been added.^^^
Redundant "and".
> +Python scripting language, and the third is defining new aliases of
> +existing commands. ^^
"for", I think.
> +@node Aliases
> +@section Creating new spellings of existing commands
Please add here an index entry:
@cindex aliases for commands
> +Define a new alias with the @samp{alias} command.
You can define a new alias with the @samp{alias} command.
> +@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}}
?
> +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?
> +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.
> +Note that aliases are different than user-defined commands.
^^^^
"from"
> +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?
> +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?
Thanks.
next prev parent reply other threads:[~2011-09-22 18:10 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 [this message]
2011-09-22 21:48 ` Doug Evans
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=83boucsb3n.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dje@google.com \
--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