View Full Version : How to enable Esc-p combination is shell?

14th July 2004, 09:47 PM
SImple question: When I've been using other servers through ssh, I've found that combination Esc-p gives the last expression that has started with the characters I have inputted so far. I hope you understand what I mean - my Engilish isn't very good :)

To clarify, here's an example:

# test.bat <enter>
something happens
# tes + Esc-p <enter>
same thing happens as two lines above

So how enable this or do I need to get another shell?
If the latter is correct, then how is it done?

BTW if I now use Esc-p combinations I get character ' : '



14th July 2004, 10:12 PM
press esc-p first and then at the : enter the first few characcters of the command you previously executed and press enter.

the shell will look in your history and complete the command for you

14th July 2004, 11:26 PM
Ok, nice, but can I do it the way I described somehow?


15th July 2004, 05:32 AM
This document (http://www.ss64.com/bash/history.html) should explain bash history... for your example the easiest thing would be to just use the up-arrow key to scroll back through the history, or ctrl-r to do a search and autocompete.