Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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). –  Dennis Williamson Jul 21 '10 at 22:54

1 Answer 1

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.