This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 0/3] Allow the user to define default leading args for commands and aliases


>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> 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
objections.

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
unnecessary.

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.

thanks,
Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]