guard/guard — pull request #327 by netzpirat (2012-09-17 15:26:57+00:00)
Title: Use Pry as Guard interactor

This is the initial integration of Pry as replacement of the Guard interactor (`:simple`, `:readline` and `:coolline` are all gone). Pry itself makes use of rb-readline and coolline whenever they are available, so support for these gems is still available.

Guard provides its own set of Pry commands that can be used to control Guard in the same way as before. However `Enter` doesn't trigger the `run_all` action anymore, instead use the `all` command.

The biggest advantage of using Pry is that it comes with a might plugin system that allows you to customize and extend the console. This will allow Guard users to release gems that provide extended functionality to Guard, as it's needed by for example by #321 and #305.

Pry will evaluate `~/.guardrc` in addition to the standard `~/.pryrc` and `./.pryrc` before the session starts, which allows the customization of prompts, commands, aliases, etc.

I didn't provide the short hand commands `c`, `s`, `p`, etc. by intention to avoid variable and method collisions (remember, we have now a full featured Ruby REPL with shell access), because it's so easy to customize it. Just add

```
Pry.config.commands.alias_command 'n', 'notification'
```

to `~/.guardrc` and you're fine.

There's still some work to do like missing commands specs and a better Pry session restore, but it works and I'd like to have people play with it and give feedback.

I recommend to have a look at the [Pry Wiki](https://github.com/pry/pry/wiki) to see what's possible.