Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

you can now do things like repl ./command without causing rlwrap to die

  • Loading branch information...
commit a2c37559545b9b9a2a2e61834230fdd2354fb761 1 parent 3f076df
@jdp jdp authored defunkt committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  bin/repl
View
3  bin/repl 100755 → 100644
@@ -45,7 +45,7 @@ completion_dir = ENV['REPL_COMPLETION_DIR'] || "~/.repl"
if File.exists?(cdir = File.expand_path(completion_dir))
script = ARGV.detect { |a| a !~ /^-/ }
if script
- cfile = Dir[cdir + '/' + script].first
+ cfile = Dir[cdir + '/' + File.basename(script)].first
cfile = nil if cfile && !File.exists?(cfile)
end
end
@@ -53,6 +53,7 @@ end
history_dir = ENV['REPL_HISTORY_DIR'] || "~/"
if File.exists?(hdir = File.expand_path(history_dir))
if script = ARGV.detect { |a| a !~ /^-/ }
+ script = File.basename(script)
hfile = "#{hdir}/.#{script}_history"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.