public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: "John R. Moore" <jmoore@redhat.com>
To: Keith Seitz <keiths@cygnus.com>
Cc: Tom Tromey <tromey@redhat.com>,
	Insight List <insight@sourceware.cygnus.com>
Subject: Re: Patch: operate-and-get-next
Date: Fri, 28 Sep 2001 09:54:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.31.0109280950130.16241-100000@makita.cygnus.com> (raw)
In-Reply-To: <Pine.GSO.4.33.0109280919240.16046-100000@makita.cygnus.com>

Keith, Tom,

I've used this feature in tcsh (using emacs syntax) and one
uses ESC-p and ESC-n to get at the historical command. I've
wondered how to do it in bash, but never bothered to look.

Now that I'm enlighten'd, I might use bash more often. :-)

BTW, there is C-n  to go up the history (if you go too many C-p's)

Don't forget to implement the C-n as well!!

Cheers,

John Moore

-------------------------------

On Fri, 28 Sep 2001, Keith Seitz wrote:

> 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
>
>
>
>

  parent reply	other threads:[~2001-09-28  9:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-28  9:15 Tom Tromey
2001-09-28  9:27 ` Keith Seitz
2001-09-28  9:36   ` Tom Tromey
2001-09-28  9:40     ` Keith Seitz
2001-09-28  9:54   ` John R. Moore [this message]
2001-09-28 10:12     ` Tom Tromey
2001-09-28 10:19   ` Tom Tromey
2001-09-28 10:27     ` Keith Seitz
2001-09-28 10:41       ` Tom Tromey
2001-09-28 11:03         ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.31.0109280950130.16241-100000@makita.cygnus.com \
    --to=jmoore@redhat.com \
    --cc=insight@sourceware.cygnus.com \
    --cc=keiths@cygnus.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).