Closed wojtha closed 7 years ago
This was maybe just an accident. After a while the issue returned and happen again on regular basis again even with the PR #19.
I have tried various things since then, it seems that it is kind of readline/zeus/guard/macOS issue. See e.g. https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X
The simplest way is just add gem rb-readline
to your development Gemfile. I've encountered several situations in past hours which I am sure would end up with corrupted terminal, but with rb-readline
it works ok.
I've found that
rubocop-guard
is breaking my ZSH terminal (but it is happening in Bash as well), especially after some error was printed to STDOUT. I had to exit from guard and runstty sane
to reset the terminal every time when this happen. This issue is bothering me for 2 months, but I was suspectingguard-rspec
which I am using as well.After some research I knew that is some ANSI escaping issue and that it is happening somewhere around
Guard::UI
orGuard::Compat::UI
. Today I first tried to disable theguard-rubocop
and the problem went away, then I discovered the PR #19 which promotes upgrade to "new"Guard::Compat
API and I give it a try. When I applied patch in #19 the problem went away as well.Before patch:
guard-rubocop (1.2.0) guard (~> 2.0) rubocop (~> 0.20)
After patch:
guard-rubocop (1.2.0-patched) guard (~> 2.0) guard-compat (~> 1.1) rubocop (~> 0.20)
System info