This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Patch: make "!" a command unconditionally
- To: tromey at cygnus dot com
- Subject: Re: Patch: make "!" a command unconditionally
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 29 Feb 2000 16:48:15 +1100
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <87itz9cabi.fsf@cygnus.com>
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