Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/repl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ if ARGV.include? '--man'
end

completion_dir = ENV['REPL_COMPLETION_DIR'] || "~/.repl"
if File.exists?(cdir = File.expand_path(completion_dir))
if File.exist?(cdir = File.expand_path(completion_dir))
script = ARGV.detect { |a| a !~ /^-/ }
if script
cfile = Dir[cdir + '/' + File.basename(script)].first
cfile = nil if cfile && !File.exists?(cfile)
cfile = nil if cfile && !File.exist?(cfile)
end
end

history_dir = ENV['REPL_HISTORY_DIR'] || "~/"
if File.exists?(hdir = File.expand_path(history_dir))
if File.exist?(hdir = File.expand_path(history_dir))
if script = ARGV.detect { |a| a !~ /^-/ }
script = File.basename(script)
hfile = "#{hdir}/.#{script}_history"
Expand Down