This is the mail archive of the
mailing list for the GDB project.
Re: [RFA 0/3] Allow the user to define default leading args for commands and aliases
- From: Tom Tromey <tom at tromey dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 24 Jul 2019 10:15:59 -0600
- Subject: Re: [RFA 0/3] Allow the user to define default leading args for commands and aliases
- References: <firstname.lastname@example.org>
>>>>> "Philippe" == Philippe Waroquiers <email@example.com> writes:
Philippe> Allow the user to define default leading args for commands and aliases.
Philippe> This patch series implements, tests and documents the following commands:
Thank you for the patches.
Philippe> set leading-args COMMAND [= LEADING-ARGS...]
Philippe> show leading-args [COMMAND]
Philippe> set enable-leading-args [on|off]
Philippe> show enable-leading-args
Philippe> It also changes the alias command to be:
Philippe> alias [-a] [--] ALIAS = COMMAND [= LEADING-ARGS...]
I don't really like the "leading args" approach, but I've put off
responding to this because I wasn't sure how to articulate my
However, I never did come up with a really good way to talk about it.
Partly, I think, the feature seems obscure. It's preferable, in my
view, to continue the approach gdb already takes; namely, adding "set"
commands to affect the behavior of commands when desirable.
On the related commands:
What is the rationale for "set enable-leading-args"? This seems truly
For "alias", I don't see why the second "=" is required. "alias" would
be better if it just allowed arguments without special syntax.
On that topic you wrote:
Philippe> Also, an '=' character must be specified in the alias command before
Philippe> the LEADING-ARGS for consistency with set leading-args.
Philippe> This also ensures that the user cannot type a wrong command name
Philippe> that would be interpreted as leading args and/or cause 'mismatch'
Philippe> of length between ALIAS and COMMAND
I don't really see this as a big concern. Presumably someone would
notice if their alias did not work properly.