From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: editing previous command in the *shell* buffer
Date: Tue, 28 Apr 2015 17:29:58 -0400 [thread overview]
Message-ID: <barmar-C3B737.17295828042015@88-209-239-213.giganet.hu> (raw)
In-Reply-To: 36243f68-c9ad-4185-af20-215cceecf0b3@googlegroups.com
In article <36243f68-c9ad-4185-af20-215cceecf0b3@googlegroups.com>,
cplum987@gmail.com wrote:
> On Tuesday, April 28, 2015 at 10:10:22 AM UTC-7, HASM wrote:
> >
> > > How can I do one or both of the following:
> > >
> > > (1) Find a previous command in the *shell* buffer via search
> > > C-s, and have pressing enter insert the command as the
> > > current command, but without execution.
> >
> > Doesn't M-r work for you?
> > M-r runs the command comint-history-isearch-backward-regexp,
> > -- HASM
>
> [BTW, I meant C-r, not C-s. My brain can never recall why my fingers type.]
>
> M-r seems to be a step in the right direction. However, you don't know what
> command line it will grab until after you press <RET>. As an example, I just
> tried "M-r cd<RET>". It found a command with "CD" in the middle of it. I
> wanted the one that started with "cd".
The parameter is a regular expression, so use "^cd" to find a command
that begins with "cd".
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
next prev parent reply other threads:[~2015-04-28 21:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 23:06 editing previous command in the *shell* buffer cplum987
2015-04-28 14:18 ` Doug Lewan
2015-04-28 17:10 ` HASM
2015-04-28 19:39 ` cplum987
2015-04-28 21:29 ` Barry Margolin [this message]
2015-04-29 0:20 ` Robert Thorpe
[not found] ` <mailman.1854.1430266854.904.help-gnu-emacs@gnu.org>
2015-04-29 4:22 ` cplum987
[not found] ` <mailman.1792.1430230730.904.help-gnu-emacs@gnu.org>
2015-04-28 19:23 ` cplum987
2015-04-29 11:57 ` Steve Perry
2015-04-29 20:14 ` cplum987
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=barmar-C3B737.17295828042015@88-209-239-213.giganet.hu \
--to=barmar@alum.mit.edu \
--cc=help-gnu-emacs@gnu.org \
/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).