Whenever I open a terminal, the last used commands appear.
I'd like to get a clean terminal when I open it, but I haven't found how to do it.
For example if while using the terminal I do:
defaults write com.apple.Finder...etc
and then I close the terminal. Next time I open the terminal I will see this same line grayed out (to indicate it's a command I used last time I opened the terminal) and a line to start writing underneath.
Best Answer
Add the following at the very end of
.bash_profile
:This will really clear the Terminal. I even defined the following function, since I didn't like the scrolling behavior of the default
clear
:I think it's the same as a hard reset of the Terminal (
Cmd-Opt-R
), but I'm not entirely sure.