0

I want to be able to use Ctrl+R to have reverse-i search. Also if I press Shift+Up Arrow after typing the first few characters of a recently executed command then the shell should complete the command by finding the most recent commmand having the same first few characters. I am using kde konsole.

1
  • csh is a much weaker shell than sh or Bash. Avoid it if you can. Although it has history substitution, I don't believe there's any way to do what you're asking (other than use its history feature). Jul 21, 2010 at 22:54

1 Answer 1

0

I would qualify Dennis W's comment, csh is much weaker for scripting than sh or Bash.

In any case, maybe you should consider a different shell. There are a lot of good ones to chose from, and given you specific need, I would check out zsh. I'm pretty sure it can do what you want. The downside of a new shell is of course, the learning curve.

AND don't sell csh short as a command-line tool. See http://docstore.mik.ua/orelly/linux/lnut/ch08_06.htm and note the items

!string 

Most recent command that starts with string.

!?string?

Most recent command that contains string.

What's not indicated in this example code is that you can add the other csh command operators 'on-top' of the '!string', and modify the string that is executed. It's been a long time since I've used csh, but something like

!string:s/old/new

is possible.

Hope this helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .