I'd like for the mac os terminal app to scroll through my command history the same way that it work in linux, if possible. Currently, if I push the up arrow in the terminal, it will scroll through each and every one of my recent commands even if the last 50 were the same exact command. On most linux systems I've used, this behavior will scroll backwards through command history, but most importanlty it will skip duplicate commands. Is this behavior possible in Mac OS X terminal app, or do I need to use a different terminal app? Thanks.
Mark who commented on my questions above was correct. This is a bash setting. If you add the following to your
~/.bash_profile script, you will get this behavior.
You can also ignore any lines that start with a space:
Or do both, by using:
Assuming that you are using bash then
in one of your bash rc file(s).