2

I use iTerm2 apps as my terminal option on my Mac computers.

On my 1st Mac, when I type clear, it just clears out the current screen, and when I scroll up, it could still show the previous contents on this tab which I really like.

On my 2nd Mac, however, when I type clear, it clears everything out of this tab. When I try to scroll up, there's nothing’s present.

How can I make my 2nd Mac behave the same as my 1st one?

I've checked every single configuration in between these two machines for iTerm and they look identical, both are using oh-my-zsh.

2
  • 4
    Check the Scrollback settings in both ITerms. It’s probably set to 0 on the new Mac.
    – Allan
    Commented Apr 26, 2023 at 17:44
  • 1
    Perfect, thanks a lot Allan! To be more specific, it's in Preferences of iTerm -> Advanced -> search for Scrollback -> change it to either unspecified or yes. Please feel free to put this as an answer to this OP and I'll accept it for all future references. Thanks! Commented Apr 26, 2023 at 20:10

1 Answer 1

4

Check iTerm2’s Scrollback Setting

The clear function just “cleans the terminal screen” so to speak. The scrollback history is a function of the Terminal emulator (App) itself, not the shell (Bash/Zsh).

Go into Preferences -> Profiles → Advanced → Scrollback Buffer then set to either “unspecified” or “yes” (confirmed per the OP)

iTerm 2 Profile Terminal Tab

See iTerm2 Terminal Profile Preferences Documentation

1
  • It works. Thanks
    – Thinkr
    Commented Apr 26, 2023 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .