tags:

views:

29

answers:

2

Hi,

I have a shell script which I execute frequently in a day with different arguments and/or options each time. What I am looking for is a way to "browse through" different executions of this shell script before selecting a particular one through CtrlR facility. How do I do that?

Ofcourse I can type "history" command and browse through the list manually;however I find CtrlR more convinient. :)

--

Ben

A: 

Try typing a common prefix and then pressing ctrl-r repeatedly to browse through different executions.

For example, let's say the command is vim, then:

  1. press CTRL-R to begin the reverse-i-search
  2. type vim
  3. press CTRL-R repeatedly to cycle through previous executions
Sheldon L. Cooper
This works. Thanks.
Ben
A: 
$ history |grep vi
  711  vi file
  748  vi file
  752  vi file

$ !711
ghostdog74