Add aliases "i ty" and "i so".
Commit Message
Hi.
I'd gotten tired enough of fully typing out "info types" and "info source"
(which otherwise collide with "info type-printers" and "info sources")
that I have this in my .gdbinit:
alias i ty = info types
alias i so = info source
Does anyone want a more generally available solution?
Another way to go is to put the "alias" solution in a more public
place (the faq or some such).
I don't have a strong preference, just in a "spring cleaning" kind of
mood. :-)
I thought of maybe "i t" for "info types" but I can't think of a reason
to prefer "t" for "types" or "threads", so I'm going with "ty" which
I think is pretty safe.
"s" is taken ("info stack", which is fine by me), so I went with "so"
for "source".
2015-01-03 Doug Evans <xdje42@gmail.com>
* source.c (_initialize_source): Add "info so" as an alias for
"info source".
* symtab.c (_initialize_symtab): Add "info ty" as an alias for
"info types".
doc/
* gdb.texinfo (Symbols): Document "info ty" and "info so" aliases.
Comments
> From: Doug Evans <xdje42@gmail.com>
> Date: Sat, 03 Jan 2015 13:55:41 -0800
>
> I'd gotten tired enough of fully typing out "info types" and "info source"
> (which otherwise collide with "info type-printers" and "info sources")
> that I have this in my .gdbinit:
>
> alias i ty = info types
> alias i so = info source
>
> Does anyone want a more generally available solution?
> Another way to go is to put the "alias" solution in a more public
> place (the faq or some such).
> I don't have a strong preference, just in a "spring cleaning" kind of
> mood. :-)
>
> I thought of maybe "i t" for "info types" but I can't think of a reason
> to prefer "t" for "types" or "threads", so I'm going with "ty" which
> I think is pretty safe.
>
> "s" is taken ("info stack", which is fine by me), so I went with "so"
> for "source".
OK for the documentation parts.
Thanks.
@@ -2053,6 +2053,7 @@ $cdir in the path means the compilation directory of the source file."),
add_info ("source", source_info,
_("Information about the current source file."));
+ add_info_alias ("so", "source", 1);
add_info ("line", line_info, _("\
Core addresses of the code for a source line.\n\
@@ -5455,6 +5455,7 @@ All global and static variable names, or those matching REGEXP."));
there is much disagreement "info types" can be fixed). */
add_info ("types", types_info,
_("All type names, or those matching REGEXP."));
+ add_info_alias ("ty", "types", 1);
add_info ("sources", sources_info,
_("Source files in the program."));
@@ -16210,7 +16210,9 @@ completely specified.
@kindex info types
@item info types @var{regexp}
+@itemx info ty @var{regexp}
@itemx info types
+@itemx info ty
Print a brief description of all types whose names match the regular
expression @var{regexp} (or all types in your program, if you supply
no argument). Each complete typename is matched as though it were a
@@ -16267,6 +16269,7 @@ collect}.
@kindex info source
@item info source
+@itemx info so
Show information about the current source file---that is, the source file for
the function containing the current point of execution:
@itemize @bullet