pryrc: add run(file) and fix $TERM check

This commit is contained in:
Henrik Lissner 2016-04-03 22:33:42 -04:00
parent 64449733e0
commit ff46d4d573

6
pryrc
View file

@ -1,6 +1,6 @@
# Pry config # Pry config
if ENV['TERM'] == 'emacs' if ENV['TERM'] == 'dumb'
Pry.config.color = false Pry.config.color = false
Pry.config.pager = false Pry.config.pager = false
Pry.config.auto_indent = false Pry.config.auto_indent = false
@ -40,3 +40,7 @@ def time(repetitions = 100, &block)
require 'benchmark' require 'benchmark'
Benchmark.bm { |b| b.report { repetitions.times(&block) } } Benchmark.bm { |b| b.report { repetitions.times(&block) } }
end end
def run(file)
require "#{Dir.pwd}/#{file}"
end