diff options
author | Kyrylo Silin <kyrylosilin@gmail.com> | 2012-08-11 00:13:22 +0300 |
---|---|---|
committer | Kyrylo Silin <kyrylosilin@gmail.com> | 2012-11-21 04:56:26 +0200 |
commit | e93e331b774ea07b88ea99d7b92abed5811e8d62 (patch) | |
tree | f2ee49d8ca723e65062192cafbe2b84429014dd9 | |
parent | a9e9129ba253d12a67eadfd6149ed6ead1f3b267 (diff) | |
download | pry-e93e331b774ea07b88ea99d7b92abed5811e8d62.tar.gz |
Implement "plugin status" subcommand
"plugin status" subcommand shows plugin statuses (active or inactive).
Add two options to this subcommand: `--active` and `--inactive`. By
default, `plugin status` will display all installed plugins. With help
of these options a user can choose, which type of plugins wants to see.
For example:
pry(main)> plugin status --active
Active Plugins:
--
debundle
rails
Also, make all newly initialized plugins inactive by setting
`self.active` to `false` (currently the default value is `nil`).
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
-rw-r--r-- | lib/pry/plugins.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pry/plugins.rb b/lib/pry/plugins.rb index d8e5e03a..8068ada1 100644 --- a/lib/pry/plugins.rb +++ b/lib/pry/plugins.rb @@ -28,6 +28,7 @@ class Pry def initialize(name, gem_name, spec, enabled) @name, @gem_name, @enabled, @spec = name, gem_name, enabled, spec + self.active = false end # Disable a plugin. (prevents plugin from being loaded, cannot |