1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Pass hist commands through stagger_output.

This commit is contained in:
Rob Gleeson 2011-05-10 13:21:17 +01:00
parent fc31bb2926
commit 7815897507

View file

@ -25,20 +25,24 @@ class Pry
pattern = Regexp.new opts[:arg_string].split(/ /)[1]
history.pop
history.each_with_index do |element, index|
history.map!.with_index do |element, index|
if element =~ pattern
output.puts "#{text.blue index}: #{element}"
"#{text.blue index}: #{element}"
end
end
stagger_output history.compact.join "\n"
end
opt.on :e, :exclude, 'Exclude pry and system commands from the history.' do
unless opt.grep?
history.each_with_index do |element, index|
history.map!.with_index do |element, index|
unless command_processor.valid_command? element
output.puts "#{text.blue index}: #{element}"
"#{text.blue index}: #{element}"
end
end
stagger_output history.compact.join "\n"
end
end