iTerm2 Shell Integrations affect STDOUT of piped sub-shells
OS X Version: 10.10.3
iTerm2 Version: Build 2.9.20150505-nightly
The shell integration for BASH seem to have a weird effect on sub-shells. Some control characters get printed even if the output is not a TTY, e.g. piped to another command. This obviously can cause very strange effects on the receiving commands...
Full repro steps.
# begin with no iterm2_shell_integration loaded...
# e.g. via: bash --norc
bash-3.2$ true | wc -c
0
bash-3.2$ (true) | wc -c
0
# all good so far...
# now load the shell integration
bash-3.2$ source ~/.iterm2_shell_integration.bash
bash-3.2$ true | wc -c
0
bash-3.2$ (true) | wc -c
8
bash-3.2$ (true) | less -R
133;C^G
(END)