diff --git a/lib/pry/command_set.rb b/lib/pry/command_set.rb index 986acda9..658d5889 100644 --- a/lib/pry/command_set.rb +++ b/lib/pry/command_set.rb @@ -152,6 +152,12 @@ class Pry @commands.each(&block) end + # Add a given command object to this set. + # @param Command the subclass of Pry::Command you wish to add. + def add_command(command) + commands[command.match] = command + end + # Removes some commands from the set # @param [Array] searches the matches or listings of the commands to remove def delete(*searches)