This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA, doc RFA] Add gdb.add_command_alias (now: alias foo = bar)
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Doug Evans <dje at google dot com>
- Cc: pedro at codesourcery dot com, gdb-patches at sourceware dot org
- Date: Thu, 29 Sep 2011 09:59:03 +0300
- Subject: Re: [RFA, doc RFA] Add gdb.add_command_alias (now: alias foo = bar)
- References: <CADPb22TJc=6vqhFfD7Qe8pf5Ac6rdE+JFscxwBd8CpKoW1u_NQ@mail.gmail.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 28 Sep 2011 16:56:34 -0700
> From: Doug Evans <dje@google.com>
> Cc: gdb-patches@sourceware.org
>
> I thought about it a bit, and "alias foo = bar" does have advantages.
>
> I will check this in next week if there are no objections.
The doc string needs to be updated, it still shows the previous syntax
"-f FROM -t TO":
> + c = add_com ("alias", class_support, alias_command, _("\
> +Define a new command that is an alias of an existing command.\n\
> +Usage: alias [-a] -f FROM -t TO\n\
> +FROM is the command to alias from.\n\
> +TO is the new command being defined.\n\
> +\"-f FROM\" and \"-t TO\" may appear in either order.\n\
> +If \"-a\" is specified, the command is an abbreviation,\n\
> +and will not appear in help command list output.\n\
> +\n\
> +Examples:\n\
> +Make \"spe\" an alias of \"set print elements\":\n\
> + alias -f \"set print elements\" -t spe\n\
> +Make \"elms\" an alias of \"elements\" in the \"set print\" command:\n\
> + alias -f \"set print elements\" -t \"set print elms\""));
Thanks.