Skip to content

Commit

Permalink
Check for local .riplrc
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Osenenko committed Aug 19, 2016
1 parent b5ce197 commit 6207841
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ripl.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module Ripl
def self.config
@config ||= { :readline => true, :riplrc => ENV['RIPL_RC'] || '~/.riplrc',
:completion => {} }
local_riplrc = File.join(Dir.pwd, '.riplrc')
riplrc = ENV['RIPL_RC'] || (local_riplrc if File.exist?(local_riplrc)) || '~/.riplrc'
@config ||= {:readline => true, :riplrc => riplrc, :completion => {}}
end

def self.start(*args) Runner.start(*args) end
Expand Down

0 comments on commit 6207841

Please sign in to comment.