From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31187 invoked by alias); 9 Sep 2011 21:15:16 -0000 Received: (qmail 31176 invoked by uid 22791); 9 Sep 2011 21:15:14 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Sep 2011 21:14:59 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LR900I00XL94C00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Sat, 10 Sep 2011 00:13:15 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.126.9.62]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LR900HJXXM2LVT0@a-mtaout20.012.net.il>; Sat, 10 Sep 2011 00:13:15 +0300 (IDT) Date: Fri, 09 Sep 2011 21:15:00 -0000 From: Eli Zaretskii Subject: Re: [RFA, doc RFA] Add gdb.add_command_alias In-reply-to: <20110909183636.444932461B1@ruffy.mtv.corp.google.com> To: dje@google.com (Doug Evans) Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <834o0l5sic.fsf@gnu.org> References: <20110909183636.444932461B1@ruffy.mtv.corp.google.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00172.txt.bz2 > 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.