guard/guard — Issue #209: Terminal keep-alive causing ERROR: Unknown command
Author: waldo
Created: 2011-12-28 14:04:50+00:00
State: open

Normally I can just hit enter on a guard running in a terminal to re-run all my specs.

However using a terminal that sends a keep-alive code (NUL) - specifically iTerm2's "when idle, send ASCII code: 0". Just hitting enter causes the build up NULs to be interpreted as a command thus the error.

I've added an additional gsub (like below) on the line variable in lib/guard/interactors/readline.rb and lib/guard/interactors/simple.rb as well as some relevant tests. And it solves the issue.

```ruby
line.gsub!(/^\W*/, '')
```
Would this be considered for inclusion or is the issue too specific? Or is it undesirable to clean the input this way?