This question already has an answer here:
Is there a key combination for bash to auto compete a command from the history? In ipython and matlab for example this is achieved by pressing up arrow after typing a few characters.
|
This question already has an answer here: Is there a key combination for bash to auto compete a command from the history? In ipython and matlab for example this is achieved by pressing up arrow after typing a few characters. |
||||
marked as duplicate by Gilles Oct 10 '14 at 22:03This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
||||
|
First of all, hitting tab in bash is even better since it autocompletes all executables in your PATH irrespecitve of whether they're in the history. That said, there are various ways of getting a command from your history:
|
|||||||||||||||||||||
|
|
You can check the command position on the history sequence with the command |
|||
|
|
|
You can also use For example, if you've been
You could then either copy/paste the command, or |
|||
|
|
Ctrl-r, then you only need to pressEnterto execute it... – jasonwryan Oct 10 '14 at 8:09