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, doc RFA] Add gdb.add_command_alias


> Date: Thu, 22 Sep 2011 11:22:26 -0700
> From: Doug Evans <dje@google.com>
> 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.


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