From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32370 invoked by alias); 23 Sep 2011 10:27:29 -0000 Received: (qmail 32360 invoked by uid 22791); 23 Sep 2011 10:27:29 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout23.012.net.il (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Sep 2011 10:27:09 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LRZ00L000TBWT00@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Fri, 23 Sep 2011 13:26:27 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.8.215]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LRZ00BTB10176A0@a-mtaout23.012.net.il>; Fri, 23 Sep 2011 13:26:27 +0300 (IDT) Date: Fri, 23 Sep 2011 11:40:00 -0000 From: Eli Zaretskii Subject: Re: [RFA, doc RFA] Add gdb.add_command_alias In-reply-to: To: Doug Evans Cc: pedro@codesourcery.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <8339fnsgh4.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <20110909183636.444932461B1@ruffy.mtv.corp.google.com> <201109131839.49816.pedro@codesourcery.com> <201109132015.04463.pedro@codesourcery.com> <83boucsb3n.fsf@gnu.org> 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/msg00428.txt.bz2 > Date: Thu, 22 Sep 2011 11:22:26 -0700 > From: Doug Evans > Cc: pedro@codesourcery.com, gdb-patches@sourceware.org > > >> +The @samp{-f FROM} option specifies the name of an existing command > >> +that is being aliased. > >> + > >> +The @samp{-t TO} option specifies the name of the new alias. > > > > Btw, I'm not sure FROM and TO are a good idea; it's not like you are > > copying something.  How about COMMAND and ALIAS instead? > > Ok, but then I have to wonder about -f and -t. > -c and -a? [setting aside -a collides with the current -a for abbreviation] > > But if you're happy with -f COMMAND -t ALIAS, great. I'm not happy about that, either, FWIW. Why not use the popular syntax used by other programs that offer aliases? E.g., (gdb) alias ALIAS=COMMAND But that's just MO, FWIW. If everyone else is happy with these letter switches, I can live with that. > >> +Note that if you are defining an alias of a @samp{set} command, > >> +you also need to define the alias of the corresponding @samp{show} > >> +command, if desired. > > > > > > "Need" and "if desired" are in contradiction.  Which is it? > > How about if I reword it to: > > Note that if you are defining an alias of a @samp{set} command, > and you want to have an alias for the corresponding @samp{show} > command, then you need to define the latter separately. Works for me, thanks.