diff options
author | Kyrylo Silin <kyrylosilin@gmail.com> | 2012-08-23 22:40:48 +0300 |
---|---|---|
committer | Kyrylo Silin <kyrylosilin@gmail.com> | 2012-11-21 04:57:43 +0200 |
commit | d8679a8ff8af24865383f31ed777840e62118350 (patch) | |
tree | 4e8719f46c3c83c5fb6093fef8275055f8da7174 | |
parent | a10f2081571367883268aefe019a4187c6d6556e (diff) | |
download | pry-d8679a8ff8af24865383f31ed777840e62118350.tar.gz |
Integrate branch with master
There were some changes in master that affect current code. Make a
couple of small amendments to feature/plugin_manager branch so the tests
pass again.
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
-rw-r--r-- | lib/pry/command.rb | 4 | ||||
-rw-r--r-- | lib/pry/commands/hist.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/pry/command.rb b/lib/pry/command.rb index 6d980757..267ac58d 100644 --- a/lib/pry/command.rb +++ b/lib/pry/command.rb @@ -642,8 +642,8 @@ class Pry # @param [String] search The line typed so far # @return [Array<String>] the words to complete def complete(search) - slop.map do |opt| - [opt.long && "--#{opt.long} " || opt.short && "-#{opt.short}"] + slop[:default].map do |opt| + [opt.long && "--#{opt.long}" || opt.short && "-#{opt.short}"] end.flatten(1).compact + super end diff --git a/lib/pry/commands/hist.rb b/lib/pry/commands/hist.rb index 2ff5cbff..34c2b94d 100644 --- a/lib/pry/commands/hist.rb +++ b/lib/pry/commands/hist.rb @@ -134,8 +134,8 @@ class Pry # "hist --replay" call def check_for_juxtaposed_replay(replay_sequence) if replay_sequence =~ /\Ahist(?:ory)?\b/ - # Create *fresh* instance of Slop for parsing of "hist" command. - _slop = self.slop + # Create *fresh* instance of Options for parsing of "hist" command. + _slop = Options.new(self.slop) _slop.parse replay_sequence.split(" ")[1..-1] if _slop.present?(:r) |