2012-08-12 00:22:29 +00:00
|
|
|
class Pry
|
2012-08-12 01:26:59 +00:00
|
|
|
Pry::Commands.create_command "import-set" do
|
2012-08-12 00:22:29 +00:00
|
|
|
group "Commands"
|
2012-08-12 01:26:59 +00:00
|
|
|
description "Import a command set."
|
2012-08-12 00:22:29 +00:00
|
|
|
|
|
|
|
def process(command_set_name)
|
|
|
|
raise CommandError, "Provide a command set name" if command_set.nil?
|
|
|
|
|
|
|
|
set = target.eval(arg_string)
|
|
|
|
_pry_.commands.import set
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|