Shell integration should only be loaded for interactive shells
Required information for bugs. I probably can't help you unless you include this:
- iTerm2 version: Build 2.9.20160206
- OS version 10.11.3
I installed shell integration, and was surprised to see one of my apps break. My app was essentially running
bash -l -c 'dirname `which python3`'
and with the shell integration installed, this added all sorts of quasi-hidden text to the output.
I would suggest that you bracket the shell integration load in ~/.profile
with something like
if [ -n "$PS1" ]; then
test -e ${HOME}/.iterm2_shell_integration.bash && source ${HOME}/.iterm2_shell_integration.bash
fi