[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: editing previous command in the *shell* buffer
From: |
Barry Margolin |
Subject: |
Re: editing previous command in the *shell* buffer |
Date: |
Tue, 28 Apr 2015 17:29:58 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
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 ***
Re: editing previous command in the *shell* buffer, Steve Perry, 2015/04/29