Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA, doc RFA] Add gdb.add_command_alias
Date: Fri, 09 Sep 2011 21:15:00 -0000	[thread overview]
Message-ID: <834o0l5sic.fsf@gnu.org> (raw)
In-Reply-To: <20110909183636.444932461B1@ruffy.mtv.corp.google.com>

> Date: Fri,  9 Sep 2011 11:36:36 -0700 (PDT)
> From: dje@google.com (Doug Evans)
> 
> Per discussion on IRC, here is a patch to add support for adding
> command aliases.

I wish people would discuss such issues here, not on IRC.  These
discussions should be recorded, for one thing.

Me, I don't understand the need for this feature, especially not why
it should be a Python-only feature.  Moreover, why do we need to have
this, when one can easily write a command that just calls an existing
one, to have the same effect.

> valid_cmd_name_p is more restrictive than it could be.
> E.g. gdb allows a user-defined command named "42", but
> "it's easier to relax restrictions than it is to impose them after the fact",
> so I'm going with this.

Sorry, I don't understand what this is about.  I guess that was again
discussed "on IRC" or wherever.

> +   NOTE: TUI has a few special commands, +, <, >.
> +   We don't watch for those here.  */

Why not?  And what does that mean in terms of user expectations?

> +This is useful, for example, when you want to be able to type a command
> +with a long name using fewer characters, and the contraction is otherwise
> +ambiguous.  It can also we used when you want to give a command an alternate
                           ^^
"be"

> +@var{name} is the name of the new command.
> [..]
> +Command names must begin with a letter, dash or underscore,
> +and must consist of letters, numbers, dashes and underscores.

  @var{name} is the name of the new command; it must begin with a
  letter, dash or underscore, and must consist of letters, numbers,
  dashes and underscores.

> +@var{command_class} should be one of the @samp{COMMAND_} constants.

Please add here a cross-reference to where these constants are
documented.


  reply	other threads:[~2011-09-09 21:15 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 [this message]
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
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=834o0l5sic.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /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