This is the mail archive of the gdb-patches@sourceware.cygnus.com 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]

Re: Patch: make "!" a command unconditionally


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

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