* [RFA] Add "inf" alias for "info"
@ 2009-07-08 13:18 Pierre Muller
2009-07-08 13:23 ` Pedro Alves
0 siblings, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-07-08 13:18 UTC (permalink / raw)
To: gdb-patches
I was used to use
(gdb) inf reg
to get a listing of registers,
but since the new "inferior" command appeared,
I now get this:
(gdb) inf reg
Ambiguous command "inf reg": inferior, info.
The proposed patch add "inf" as an alias
of "info", saving the hassle of retyping "info"
after the message above.
I think that "inferior" is a far less used command
and it is only useful for targets supporting
multiple inferiors...
Is this patch OK?
Pierre Muller
Pascal language support maintainer for GDB
2009-07-08 Pierre Muller <muller@ics.u-strasbg.fr>
* cli/cli-cmds.c (init_cli_cmds): Add "inf" alias for "info"
command.
Index: cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.90
diff -u -p -r1.90 cli-cmds.c
--- cli/cli-cmds.c 2 Jul 2009 21:57:28 -0000 1.90
+++ cli/cli-cmds.c 8 Jul 2009 13:15:11 -0000
@@ -1341,6 +1341,7 @@ Without an argument, history expansion i
Generic command for showing things about the program being debugged."),
&infolist, "info ", 0, &cmdlist);
add_com_alias ("i", "info", class_info, 1);
+ add_com_alias ("inf", "info", class_info, 1);
add_com ("complete", class_obscure, complete_command,
_("List the completions for the rest of the line as a
command."));
~
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:18 [RFA] Add "inf" alias for "info" Pierre Muller
@ 2009-07-08 13:23 ` Pedro Alves
2009-07-08 13:25 ` Daniel Jacobowitz
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Pedro Alves @ 2009-07-08 13:23 UTC (permalink / raw)
To: gdb-patches; +Cc: Pierre Muller
On Wednesday 08 July 2009 14:18:12, Pierre Muller wrote:
>
> I was used to use
> (gdb) inf reg
> to get a listing of registers,
> but since the new "inferior" command appeared,
> I now get this:
> (gdb) inf reg
> Ambiguous command "inf reg": inferior, info.
>
> The proposed patch add "inf" as an alias
> of "info", saving the hassle of retyping "info"
> after the message above.
Why not type just "i"? It is already an alias for "info", and,
it's shorter anyway ==> less hassle.
--
Pedro Alves
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:23 ` Pedro Alves
@ 2009-07-08 13:25 ` Daniel Jacobowitz
2009-07-08 13:26 ` Pedro Alves
2009-07-08 13:28 ` Pierre Muller
2009-07-08 17:43 ` Michael Snyder
2 siblings, 1 reply; 13+ messages in thread
From: Daniel Jacobowitz @ 2009-07-08 13:25 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, Pierre Muller
On Wed, Jul 08, 2009 at 02:23:13PM +0100, Pedro Alves wrote:
> Why not type just "i"? It is already an alias for "info", and,
> it's shorter anyway ==> less hassle.
While I agree, I think an "inf" alias is fine too.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:25 ` Daniel Jacobowitz
@ 2009-07-08 13:26 ` Pedro Alves
2009-07-08 13:35 ` Daniel Jacobowitz
0 siblings, 1 reply; 13+ messages in thread
From: Pedro Alves @ 2009-07-08 13:26 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, Pierre Muller
On Wednesday 08 July 2009 14:25:01, Daniel Jacobowitz wrote:
> On Wed, Jul 08, 2009 at 02:23:13PM +0100, Pedro Alves wrote:
> > Why not type just "i"? It is already an alias for "info", and,
> > it's shorter anyway ==> less hassle.
>
> While I agree, I think an "inf" alias is fine too.
>
Can I claim it for "inferior" then? :-P
--
Pedro Alves
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [RFA] Add "inf" alias for "info"
2009-07-08 13:23 ` Pedro Alves
2009-07-08 13:25 ` Daniel Jacobowitz
@ 2009-07-08 13:28 ` Pierre Muller
2009-07-08 13:36 ` Pedro Alves
2009-07-08 17:43 ` Michael Snyder
2 siblings, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-07-08 13:28 UTC (permalink / raw)
To: 'Pedro Alves', gdb-patches
> > The proposed patch add "inf" as an alias
> > of "info", saving the hassle of retyping "info"
> > after the message above.
>
> Why not type just "i"? It is already an alias for "info", and,
> it's shorter anyway ==> less hassle.
No really good reasons but,
I used "inf " for years and didn't know "i " worked,
I discovered it while writing the patch!
But I am too used to "inf " to be able to switch to "i "
easily!
Pierre
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:26 ` Pedro Alves
@ 2009-07-08 13:35 ` Daniel Jacobowitz
2009-07-08 13:48 ` Pedro Alves
0 siblings, 1 reply; 13+ messages in thread
From: Daniel Jacobowitz @ 2009-07-08 13:35 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, Pierre Muller
On Wed, Jul 08, 2009 at 02:26:30PM +0100, Pedro Alves wrote:
> On Wednesday 08 July 2009 14:25:01, Daniel Jacobowitz wrote:
> > On Wed, Jul 08, 2009 at 02:23:13PM +0100, Pedro Alves wrote:
> > > Why not type just "i"? Â It is already an alias for "info", and,
> > > it's shorter anyway ==> less hassle.
> >
> > While I agree, I think an "inf" alias is fine too.
> >
>
> Can I claim it for "inferior" then? :-P
No :-) We've been through this for other new commands - if people use
a shortcut, I think we're pretty much obliged to preserve it.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:28 ` Pierre Muller
@ 2009-07-08 13:36 ` Pedro Alves
2009-07-08 13:41 ` Pierre Muller
0 siblings, 1 reply; 13+ messages in thread
From: Pedro Alves @ 2009-07-08 13:36 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Wednesday 08 July 2009 14:28:05, Pierre Muller wrote:
> > > The proposed patch add "inf" as an alias
> > > of "info", saving the hassle of retyping "info"
> > > after the message above.
> >
> > Why not type just "i"? It is already an alias for "info", and,
> > it's shorter anyway ==> less hassle.
>
> No really good reasons but,
> I used "inf " for years and didn't know "i " worked,
> I discovered it while writing the patch!
> But I am too used to "inf " to be able to switch to "i "
> easily!
I'm sure that you'll now get used to "i" in no time, now
that you know it.
This revealed an interesting issue. The
'Ambiguous command "inf reg": inferior, info.'
... message doesn't indicate the aliases of each alternative
command. Neither does "help info" mention "i". Maybe it should.
(btw, "i" + "inf" would leave "in" in a weird spot)
--
Pedro Alves
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: [RFA] Add "inf" alias for "info"
2009-07-08 13:36 ` Pedro Alves
@ 2009-07-08 13:41 ` Pierre Muller
2009-07-08 13:44 ` Pedro Alves
0 siblings, 1 reply; 13+ messages in thread
From: Pierre Muller @ 2009-07-08 13:41 UTC (permalink / raw)
To: 'Pedro Alves'; +Cc: gdb-patches
> I'm sure that you'll now get used to "i" in no time, now
> that you know it.
Not that sure...
But I still think that the patch will be useful to others..
> This revealed an interesting issue. The
>
> 'Ambiguous command "inf reg": inferior, info.'
>
> ... message doesn't indicate the aliases of each alternative
> command. Neither does "help info" mention "i". Maybe it should.
>
> (btw, "i" + "inf" would leave "in" in a weird spot)
But "in " was ambiguous before you added
"inferior", that is why I did not add it to the patch.
Nobody using a recent gdb could have used
"in " like she/he could have used "inf ".
Pierre
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:41 ` Pierre Muller
@ 2009-07-08 13:44 ` Pedro Alves
0 siblings, 0 replies; 13+ messages in thread
From: Pedro Alves @ 2009-07-08 13:44 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Wednesday 08 July 2009 14:41:03, Pierre Muller wrote:
> > I'm sure that you'll now get used to "i" in no time, now
> > that you know it.
>
> Not that sure...
> But I still think that the patch will be useful to others..
Sure, I'm not really objecting. "inf " as is currently
isn't useful for anything anyway.
> > This revealed an interesting issue. The
> >
> > 'Ambiguous command "inf reg": inferior, info.'
> >
> > ... message doesn't indicate the aliases of each alternative
> > command. Neither does "help info" mention "i". Maybe it should.
> >
> > (btw, "i" + "inf" would leave "in" in a weird spot)
>
> But "in " was ambiguous before you added
> "inferior", that is why I did not add it to the patch.
> Nobody using a recent gdb could have used
> "in " like she/he could have used "inf ".
Yes.
--
Pedro Alves
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:35 ` Daniel Jacobowitz
@ 2009-07-08 13:48 ` Pedro Alves
2009-07-08 14:00 ` Daniel Jacobowitz
0 siblings, 1 reply; 13+ messages in thread
From: Pedro Alves @ 2009-07-08 13:48 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, Pierre Muller
On Wednesday 08 July 2009 14:35:38, Daniel Jacobowitz wrote:
> > Can I claim it for "inferior" then? :-P
>
> No :-) We've been through this for other new commands - if people use
> a shortcut, I think we're pretty much obliged to preserve it.
Yeah, I know... I had a wild dream where I'd get "inf" just for
me, but well, I can do "infe". :-)
BTW, *does* the user have a way to know the aliases of a given
command? (reading the manual doesn't count) Not event
"help aliases" seems to show "i".
--
Pedro Alves
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:48 ` Pedro Alves
@ 2009-07-08 14:00 ` Daniel Jacobowitz
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Jacobowitz @ 2009-07-08 14:00 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, Pierre Muller
On Wed, Jul 08, 2009 at 02:48:13PM +0100, Pedro Alves wrote:
> BTW, *does* the user have a way to know the aliases of a given
> command? (reading the manual doesn't count) Not event
> "help aliases" seems to show "i".
I don't think so :-(
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 13:23 ` Pedro Alves
2009-07-08 13:25 ` Daniel Jacobowitz
2009-07-08 13:28 ` Pierre Muller
@ 2009-07-08 17:43 ` Michael Snyder
2009-07-08 20:08 ` Pedro Alves
2 siblings, 1 reply; 13+ messages in thread
From: Michael Snyder @ 2009-07-08 17:43 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches, Pierre Muller
Pedro Alves wrote:
> On Wednesday 08 July 2009 14:18:12, Pierre Muller wrote:
>> I was used to use
>> (gdb) inf reg
>> to get a listing of registers,
>> but since the new "inferior" command appeared,
>> I now get this:
>> (gdb) inf reg
>> Ambiguous command "inf reg": inferior, info.
>>
>> The proposed patch add "inf" as an alias
>> of "info", saving the hassle of retyping "info"
>> after the message above.
>
> Why not type just "i"? It is already an alias for "info", and,
> it's shorter anyway ==> less hassle.
Because his fingers remember typing "inf". ;-)
I think we've been through this before, and the custom
has generally favored adding the alias.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [RFA] Add "inf" alias for "info"
2009-07-08 17:43 ` Michael Snyder
@ 2009-07-08 20:08 ` Pedro Alves
0 siblings, 0 replies; 13+ messages in thread
From: Pedro Alves @ 2009-07-08 20:08 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches, Pierre Muller
On Wednesday 08 July 2009 18:15:44, Michael Snyder wrote:
> I think we've been through this before, and the custom
> has generally favored adding the alias.
Yes, I'd already agreed downthread.
Pierre, I think everyone agrees the patch is good to go.
Please apply. Thanks.
--
Pedro Alves
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-07-08 18:24 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-08 13:18 [RFA] Add "inf" alias for "info" Pierre Muller
2009-07-08 13:23 ` Pedro Alves
2009-07-08 13:25 ` Daniel Jacobowitz
2009-07-08 13:26 ` Pedro Alves
2009-07-08 13:35 ` Daniel Jacobowitz
2009-07-08 13:48 ` Pedro Alves
2009-07-08 14:00 ` Daniel Jacobowitz
2009-07-08 13:28 ` Pierre Muller
2009-07-08 13:36 ` Pedro Alves
2009-07-08 13:41 ` Pierre Muller
2009-07-08 13:44 ` Pedro Alves
2009-07-08 17:43 ` Michael Snyder
2009-07-08 20:08 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox