pry/pry — pull request #979 by robgleeson (2013-09-21 19:22:27+00:00)
Title: add Pry::CommandSet#[]=.

Pry::CommandSet#[]= can be used to re-assign commands or add new ones to
a command set. The key matches the pattern of a command you'd like to
replace and the value is the command you'd the pattern to be matched
with.

The key is really important. You could say this:

Pry.commands.command "hello" do
output.puts "Hello! :)"
end
Pry.commands["help"] = Pry.commands["hello"]

I would expect "help" to print "Hello! :)", but the command is bound to
the pattern "hello". A new subclass of the "hello" command is created
and the key is used as the match pattern, so "help" will print "Hello! :)".

You can use #[]= to replace commands, maybe your own 'help' implementation:

Pry.commands["help"] = Pry.commands.command "help" do
output.puts "Being helpful!"
end

I decided to implement this based on SO post found here:
http://stackoverflow.com/questions/17475829/configure-help-output-in-pry