summaryrefslogtreecommitdiff
path: root/bin/pry
diff options
context:
space:
mode:
authorJohn Mair <jrmair@gmail.com>2011-06-17 01:41:40 +1200
committerJohn Mair <jrmair@gmail.com>2011-06-17 01:41:40 +1200
commitb3138965d5b6b7dc201d2185f31f32765de3aab1 (patch)
treef419085b22abfa629320cf938fe6c36c50f32848 /bin/pry
parent57073b733411fa17c39f50dc33775d84ff05f81d (diff)
downloadpry-b3138965d5b6b7dc201d2185f31f32765de3aab1.tar.gz
added --installed-plugins switch to pry binary to list installed plugins with description
Diffstat (limited to 'bin/pry')
-rw-r--r--bin/pry11
1 files changed, 11 insertions, 0 deletions
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