Re: / (slash) command : fast way to temporarily change setting(s) to run a command

Philippe Waroquiers <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On Mon, 2019-04-15 at 23:06 -0400, Simon Marchi wrote:
> Hi Philippe,
> 
> I like the idea, I would probably use it most with /e (for long strings) and /p.
> I just tried it a little bit, and I appreciate the fact that it's easy to apply
> to your previous command.  Just type up and add the prefix to the beginning of the
> line.
Interesting, that was not the primary use case I was thinking to.

We could make this even easier by making COMMAND optional in:
   Usage: /SETTING... [COMMAND]
and giving no command means to repeat the previous command with the additional
given settings e.g. :
    (gdb) some command
    .... some command output
    (gdb) /e
        => executes /e some command

    (gdb) /e some command
    ... some command output
    (gdb) /p
       => executes  /ep some command

I guess we probably call dont_repeat () in / command
when no COMMAND is given.

> 
> About that help, I would just add a few newlines here and there to space things
> out and ease the reading.  Other than that, it's quite clear.
Ok, will add some new lines in the v2 of the patch.

Thanks for the feedback

Philippe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.