Skip to content

Commit 6207841

Browse files
author
Anton Osenenko
committed
Check for local .riplrc
1 parent b5ce197 commit 6207841

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/ripl.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module Ripl
22
def self.config
3-
@config ||= { :readline => true, :riplrc => ENV['RIPL_RC'] || '~/.riplrc',
4-
:completion => {} }
3+
local_riplrc = File.join(Dir.pwd, '.riplrc')
4+
riplrc = ENV['RIPL_RC'] || (local_riplrc if File.exist?(local_riplrc)) || '~/.riplrc'
5+
@config ||= {:readline => true, :riplrc => riplrc, :completion => {}}
56
end
67

78
def self.start(*args) Runner.start(*args) end

0 commit comments

Comments
 (0)