Skip to content

Commit

Permalink
improved method for loading saved history
Browse files Browse the repository at this point in the history
  • Loading branch information
banister committed Apr 2, 2012
1 parent c5567b2 commit f250284
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/pry-coolline.rb
Expand Up @@ -11,15 +11,14 @@
cool.word_boundaries = [" ", "\t", ",", ";", ".", '"', "'", "`", "<", ">",
"=", ";", "|", "{", "}", "(", ")", "-"]

cool.history_file = Coolline::NullFile
# bring saved history into coolline
cool.history_file = Pry.config.history.file

cool.transform_proc = proc do
CodeRay.scan(cool.line, :ruby).term
end
end

# bring saved history into coolline
Pry.config.input.history.reopen Pry.config.history.file
rescue LoadError
end if ENV["TERM"] != "dumb"

2 changes: 1 addition & 1 deletion lib/pry-coolline/version.rb
@@ -1,3 +1,3 @@
module PryCoolline
VERSION = "0.1.2"
VERSION = "0.1.3"
end
4 changes: 2 additions & 2 deletions pry-coolline.gemspec
Expand Up @@ -2,11 +2,11 @@

Gem::Specification.new do |s|
s.name = "pry-coolline"
s.version = "0.1.2"
s.version = "0.1.3"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["John Mair (banisterfiend)"]
s.date = "2012-04-02"
s.date = "2012-04-03"
s.description = "Live syntax-highlighting for the Pry REPL"
s.email = "jrmair@gmail.com"
s.files = [".gemtest", ".gitignore", ".yardopts", "CHANGELOG", "LICENSE", "README.md", "Rakefile", "lib/pry-coolline.rb", "lib/pry-coolline/version.rb", "pry-coolline.gemspec", "test/test.rb"]
Expand Down

0 comments on commit f250284

Please sign in to comment.