I've recently re-installed iTerm2 and am now running into an interesting problem after setting up iTerm's Shell Integration.
Upon open a new terminal window, everything seems to look correct, showing the proper "agnoster" theme from Oh My ZSH:
If I issue clear
, now my terminal window looks like this:
I can revert things to the original state by sourcing ~/.zshrc
once again, but I'm really curious about the root issue and if there's any way to fix it.
I have tried hiding the marker in iTerm's settings, but that just results in a blank terminal.
In a previous install (before I wiped this Mac), I had Oh My ZSH and Shell Integration both going, and although it looked kind of wonky at times, it still seemed to keep the Oh My ZSH theme regardless of clearing the terminal or issuing any other command.
Does anyone have any ideas on this? I've checked the iTerm settings over and over, but can't seem to find anything that would be related.
Best Answer
Late answer but this worked for me.
The iTerm2 Shell Integrations page has you download the install script and pipe it into bash.
Instead, download it locally and modify it so it knows you are using ZSH.
First, download the script
Then, instead of having the script determine the shell just define it as "zsh"
Next, make the install script executable and then run it
After that the integration should be installed properly.
Note Remove the Bash integration if you don't need it.