This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


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

Re: Patch: operate-and-get-next


On 28 Sep 2001, Tom Tromey wrote:

> One of my favorite features in Bash is called operate-and-get-next.
> This is a readline function bound to Control-o.  It lets you easily
> repeat a sequence of commands from history.

Nope, sorry. I cannot accept this. This would be a new feature, and we
cannot implement new features until the sun goes super-nova. Sorry.

> What you do is use C-p to find the first command in a sequence.  You
> use C-o to execute it (like pressing Enter), and when the next prompt
> comes up, the next command from history is already inserted for you.

This is too cool. I never even knew this existed! :-)

> I still use the Insight console quite a bit, and I really miss this
> feature.  So today I implemented it.  The patch is appended.  Is this
> ok to commit?

I use the console quite a bit, too, but I do it 75% of the time because it
helps elide problems with gdb and insight getting out of sync.(Try up/down
in the console window. It doesn't work properly.)

I have one very little nit...

>  #-------------------------------------------------------------------
> +#  METHOD:  _operate_and_get_next - Invoke the current command and,
> +#           if this command came from the history, arrange for the
> +#           next history command to be inserted once this command
> +#           is finished.
> +# ------------------------------------------------------------------

Could you change this to the "new" comment format? I know, this isn't
documented anywhere... I started doing this in regwin.it[hb] when I
tweaked the register window. I'm gonna try to stay consistent in its use
for new work. This'll help me track what has been touched recently and
what is still "legacy" code.

Something like:

# ------------------------------------------------------------------
#  NAME:         ConsoleWin::_operate_and_get_next
#  DESCRIPTION:  Invokes the current command and, if this
#                command came from the history, arrange for
#                the next history command to be inserted once this
#                command is finished.
#
#  ARGUMENTS:    None
#  RETURNS:      Nothing
# ------------------------------------------------------------------

Otherwise, APPROVED! :-) (Wow, a new feature. Where's my champagne?)

Now all we need to do is get ^R working...
Keith




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