pry/pry — pull request #1004 by csexton (2013-11-23 01:21:27+00:00)
Title: Add Watch Command

@ConradIrwin mentioned that having a `watch` command that will evaluate an expression on every command. This sounded amazingly useful to me, so I figured I would take a swing at implementing it. But first I thought I might see if anyone had any feedback.

What about something like this:

````
[1] pry(main)> watch capt_mal
watch:
capt_mal #=> "Tight Pants"

[2] pry(main)> capt_mal = "Pretty floral bonnet"
watch:
capt_mal #=> "Pretty floral bonnet"
=> "Pretty floral bonnet"
```

The help banner might be like this:

```
Usage: watch [EXPRESSION]
watch --delete
watch --delete [N]
watch --list

Evaluate and display an expression after every command.

-d, --delete Delete the watch expression at given index. If no
index is given will clear all watch expressions.
-l, --list Show the list of the current watch expressions

```

This is just a suggestion if something isn't idiomatic for pry let me know. Or say something if you'd prefer things to work differently.