Is there a log of recent terminal sessions at all? Or anyway I can see what was written to console before I last quit?
Shell Integration is a feature exclusive to iTerm2 that uses knowledge about your shell prompt to help you navigate from one shell prompt to another, record your command history, suggest most used directories, helps you re-run commands, download files from remote hosts with a click, upload files to remote hosts with ...
If Preferences>General>Save copy/paste history and command history to disk is enabled, then command history will be preserved across runs of iTerm2 (up to 200 commands per user/hostname).
If you open up the Preferences > Profiles page for iTerm2 and edit the profile you're currently using (this is probably “Default”) you can increase the scrollback. Under the Terminal section you can adjust the number of scrollback lines to a higher number or just enable “Unlimited scrollback” if you want it all.
There is the option to save a log of your session to a file, however, by default this isn't done.
To activate the session logs, go to iTerm2 Preferences (⌘,), select the "Profiles" tab, then the "Session" tab. Under "Miscellaneous" you can specify a folder where log files for your sessions shall be saved in the future.
Edit:
These session logs can become quite big, so you might want to have a look from time to time to not clutter your drive.
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