You don't need to modify the code. You can set the prompt to a host of color/styles other than reverse video. Read https://github.com/jarun/googler#colors.
Another way to debug that I can think of is to use iTerm2's session logging. It logs every character printed to the terminal verbatim, so that's something to check. To enable, go to Profiles->Session->Miscellaneous->Automatically log session input to files in:.
> something that might help - If I pbpaste the output of yes q | \googler hello | pbcopy then the characters are encoded correctly...
Okay that's something. But this is not an "encoding" issue; it's not like `\x1b` is somehow wrongly "encoded", you're getting colors just fine.
Prints just fine here. iTerm2 3.1.20170919-nightly, macOS 10.12.6. `TERM` is `xterm-256color`. See screenshot below for Preferences->Profiles->Terminal->Terminal Emulation setting. I don't think it would be any different on El Cap; reverse video is extremely basic stuff.
<img width="951" alt="screen shot 2017-09-22 at 2 13 01 pm" src="https://user-images.githubusercontent.com/4149852/30758386-31101d50-9fa0-11e7-9ab7-3f359e32dbc2.png">
<img width="489" alt="screen shot 2017-09-22 at 2 15 43 pm" src="https://user-images.githubusercontent.com/4149852/30758479-9d459a36-9fa0-11e7-875c-766caee6f101.png">
You might want to check this on a clean VM if you can.
That doesn't sound right at all. I'm an iTerm2 user on macOS. Please run
```
yes q | \googler hello >/tmp/googler.output
```
and upload `/tmp/googler.output` to gist.github.com. Make sure you don't lose any characters in the process (you can download the file yourself and compare the checksum to the original). I'll have a look.
> Perhaps this PR to make the m4 dependency of gmp build only will help: #4391
It doesn't seem to help.
> Has there been any progress on a solution?
As I pointed out in [this analysis](https://github.com/Linuxbrew/homebrew-core/issues/4198#issuecomment-331112599), the "solution" is to uninstall gawk.