README.md in pry-moves-1.0.12 vs README.md in pry-moves-1.0.13
- old
+ new
@@ -36,17 +36,24 @@
* `$` - fully print current function without line numbers
* `debug some_method(some_param)` - call `some_method(some_param)` and interactively step into it. This way you can virtually "step back" by executing previous pieces of code from current method
* `.method` or `123` or `:hash_key` - Continue traversing of last object in history. E.g. `orders` will list array, then `3` will enter `orders[3]`, then `.price` will enter `orders[3].price`
* `watch variable` - display variable's value on each step
* `diff expression` - display difference between saved expression (on first run) and expression 2
-* `profile` - profile most time-consuming code
+* `profile [timeout]` - profile time-consuming code and infinite loops/recursion
* `off` - Turn off debugging (don't stop on breakpoints)
* `@` - restart and reload scripts (in app/ & spec/ by default), reload rake tasks. Configurable.
* `#` - exit with code 3, can be wrapped in bash script to fully reload ruby scripts
* `!` - exit
Variable & methods names takes precedence over commands.
-So if you have variable named `step`, to execute command `step` type `cmd step` or command's alias, e.g. `s`
+So if you have variable named `step`, to execute command `step` type `cmd step` or command's alias, e.g. `s`
+
+Custom commands:
+```ruby
+PryMoves.custom_command "say" do |args, output|
+ output.puts "Pry says: #{args}"
+end
+```
## Examples
To use, invoke `pry` normally: