It's not immediately obvious in the iTerm2 documentation on how to change it.
Scrollback lines
value take effect immediately so check Unlimited scrollback
now if you don't want to delete your current buffer(s)Scrollback Lines
to whatever you'd likeUnlimited scrollback
option if you'd like to use your Scrollback lines
valueIt's not a shell problem, it's about your terminal emulator.
You have to find the option in the configuration / options / tools / whatever, for the number of lines to remember.
Apparently you know your terminal emulator is iterm2.
Looking for iterm2 on the google will lead you to the official website, then go to 'Documentation', Ctrl+F 'number' and find
Scrollback lines
The number of lines of scrollback buffer to keep above the visible part of the screen.
With zsh and iTerm2 Build 3.2.5, an additional step is required: Preferences->Profiles->terminal->check UnlimitedScrollback
->Check save lines to scrollback when an app status bar is present
Scrolling was breaking for me without the last one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With