This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Patch: make "!" a command unconditionally
Tom Tromey wrote:
>
> >>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>
> Andrew> From memory this has been suggested before. The problem pointed out
> Andrew> last time was that you need to specify:
>
> Andrew> ``!'' <space> <command>
>
> I suggested it last time but didn't supply a patch.
> I agree it would be nice to eliminate the space.
> That's probably more than a 20 second hack though :-(
>
> Andrew> I think there also may have been a debate over ``!'' as a
> Andrew> shell escape vs ``!'' for history. (personally it didn't
> Andrew> worry me). Fernando?
>
> This doesn't bother me either. For these kinds of tools "!" is more
> typically a shell escape.
FYI, I've checked in the attatched.
> Speaking of history, I wish gdb would pick up bash's "C-o"
> (operate-and-get-next) binding.
Hmm,
operate-and-get-next (C-o)
Accept the current line for execution and fetch the
next line relative to the current line from the
history for editing. Any argument is ignored.
learn something new every day. Probably involves tweeks to the readline
interface.
Andrew
Mon Mar 20 19:58:45 2000 Andrew Cagney <cagney@b1.cygnus.com>
* command.c (_initialize_command): Document requirements for ``!''
command.
Index: command.c
===================================================================
RCS file: /cvs/src/src/gdb/command.c,v
retrieving revision 1.2
diff -p -r1.2 command.c
*** command.c 2000/02/09 08:52:45 1.2
--- command.c 2000/03/20 08:59:25
*************** _initialize_command ()
*** 1678,1683 ****
--- 1678,1689 ----
"Execute the rest of the line as a shell command. \n\
With no arguments, run an inferior shell.");
+ /* NOTE: cagney/2000-03-20: Being able to enter ``(gdb) !ls'' would
+ be a really useful feature. Unfortunatly, the below wont do
+ this. Instead it adds support for the form ``(gdb) ! ls''
+ (i.e. the space is required). If the ``!'' command below is
+ added the complains about no ``!'' command would be replaced by
+ complains about how the ``!'' command is broken :-) */
if (xdb_commands)
add_com_alias ("!", "shell", class_support, 0);