mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
added --installed-plugins switch to pry binary to list installed plugins with description
This commit is contained in:
parent
57073b7334
commit
b3138965d5
1 changed files with 11 additions and 0 deletions
11
bin/pry
11
bin/pry
|
@ -39,6 +39,8 @@ See: `https://github.com/banister` for more information.
|
|||
Pry.config.plugins.enabled = false
|
||||
end
|
||||
|
||||
on "installed-plugins", "List installed plugins."
|
||||
|
||||
on "simple-prompt", "Enable simple prompt mode" do
|
||||
Pry.prompt = Pry::SIMPLE_PROMPT
|
||||
end
|
||||
|
@ -63,6 +65,15 @@ See: `https://github.com/banister` for more information.
|
|||
)
|
||||
end
|
||||
|
||||
if opts["installed-plugins"]
|
||||
puts "Installed Plugins:"
|
||||
puts "--"
|
||||
Pry.locate_plugins.each do |plugin|
|
||||
puts "#{plugin.name}".ljust(18) + plugin.spec.summary
|
||||
end
|
||||
exit
|
||||
end
|
||||
|
||||
# invoked via cli
|
||||
Pry.cli = true
|
||||
|
||||
|
|
Loading…
Reference in a new issue