Improved Terminal autocomplete funcionality (similar to Matlab's) If any of you ever used Matlab, you might have noticed the command window functionality in that program. I wonder if it is possible to enable the same functionality in Mac Terminal.

It works like this: suppose you have used two commands previously in this Terminal session. First you used a cd ~ and then a ls -la.

In every *nix terminal, including Mac's, if you hit the Up Arrow, it'll first show the ls -la command and, if you hit it twice, the cd ~ command. This is great. But, in Matlab, if you first type the letter c and then hit Up Arrow, it won't show you ls, but instead go directly to cd ~. This saves a lot of time when you have big commands and a long list of previously used commands.

Is it possible?
In a Bash shell, you can hit Control+R to do a reverse intelligent search in the history. Start typing the command and the shell will autocomplete with previously entered commands.

Then you can either press Enter to execute the command again, use the arrow left or right key to edit the command, or keep pressing Control+R to cycle through other possible completions.