Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

No plugins #777

Closed
wants to merge 3 commits into from

2 participants

@swarley

Suggested fix to #526 Just a minor addition, but things could be slimmed down still. In my opinion this is a good fix without having to refactor the entire plugin base.

@kyrylo
Collaborator

Thank you. I squashed your commits into one. Closed by 06bff9a

@kyrylo kyrylo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 2 deletions.
  1. +12 −2 lib/pry/cli.rb
View
14 lib/pry/cli.rb
@@ -84,7 +84,15 @@ def parse_options(args=ARGV.dup)
exec_string = ""
# Bring in options defined by plugins
-Pry::CLI.add_plugin_options
+Slop.new do
+ on "no-plugins" do
+ Pry.config.should_load_plugins = false
+ end
+end.parse(ARGV.dup)
+
+if Pry.config.should_load_plugins
+ Pry::CLI.add_plugin_options
+end
# The default Pry command line options (before plugin options are included)
Pry::CLI.add_options do
@@ -178,8 +186,10 @@ def parse_options(args=ARGV.dup)
Pry.load_file_through_repl(full_name)
exit
end
-
+
# Start the session (running any code passed with -e, if there is any)
Pry.start(context, :input => StringIO.new(exec_string))
end
+
+
Something went wrong with that request. Please try again.