cancel
Showing results for 
Search instead for 
Did you mean: 

command recall in bash

SOLVED
Go to solution
Allanm
Super Advisor

command recall in bash


Is there a way to recall commands in bash shell just like / in ksh apart from using the arrow keys.
4 REPLIES
Ivan Ferreira
Honored Contributor
Solution

Re: command recall in bash

Hit CTRL+R and you will search for commands as you type. Hit CTRL+R again and you will find the next one.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
TwoProc
Honored Contributor

Re: command recall in bash

CTRL R is really neat(thanks Ivan, nice posting), but if you want it to work "just like / in ksh".

Then, you just type in:
$> set -o vi

or add the above command to your .bash_profile file in your home directory.

This allows you to use the "/" command exactly like in ksh.
We are the people our parents warned us about --Jimmy Buffett
Allanm
Super Advisor

Re: command recall in bash


Reopening an old Thread...

I want to get rid of "arg:" when I am in the insert mode and trying to feed in numbers.

Please help what I need to do. this is very anoying.

Thanks,
Allan.
TwoProc
Honored Contributor

Re: command recall in bash

Allan,

If I can add one more thing - what I like about what Ivan posted is that it doesn't interfere with setting "set -o vi". Meaning that you can use both the old ksh "/" method with "set -o vi", but even with that set - CTRL-R still works great.
We are the people our parents warned us about --Jimmy Buffett