From b3138965d5b6b7dc201d2185f31f32765de3aab1 Mon Sep 17 00:00:00 2001 From: John Mair Date: Fri, 17 Jun 2011 01:41:40 +1200 Subject: [PATCH] added --installed-plugins switch to pry binary to list installed plugins with description --- bin/pry | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/pry b/bin/pry index e1100070..2bf1f769 100644 --- a/bin/pry +++ b/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