Patch: make "!" a command unconditionally

Andrew Cagney ac131313@cygnus.com
Mon Feb 28 21:49:00 GMT 2000


Tom Tromey wrote:
> 
> I'd like "!" to be an unconditional alias for "shell".
> Here is a patch.
> 
> 2000-02-28  Tom Tromey  <tromey@cygnus.com>
> 
>         * command.c (_initialize_command): Make "!" alias
>         unconditionally.
> 
> Tom
> 
> Index: command.c
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/command.c,v
> retrieving revision 1.65
> diff -u -r1.65 command.c
> --- command.c   2000/02/09 08:53:11     1.65
> +++ command.c   2000/02/28 20:57:08
> @@ -1678,8 +1678,7 @@
>            "Execute the rest of the line as a shell command.  \n\
>  With no arguments, run an inferior shell.");
> 
> -  if (xdb_commands)
> -    add_com_alias ("!", "shell", class_support, 0);
> +  add_com_alias ("!", "shell", class_support, 0);
> 
>    add_com ("make", class_support, make_command,
>         "Run the ``make'' program using the rest of the line as arguments.");

>From memory this has been suggested before.  The problem pointed out
last time was that you need to specify:

	``!'' <space> <command>

I think there also may have been a debate over ``!'' as a shell escape
vs ``!'' for history.
(personally it didn't worry me).  Fernando?

	Andrew


More information about the Gdb-patches mailing list