JuliaLang/julia — pull request #5343 by carlobaldassi (2014-01-09 23:06:10+00:00)
Title: Add file completion to the REPL

I know the readline REPL is going to be substituted with pure julia, but since that does not seem to be as imminent as I used to think and since not having file completion is really annoying, I patched the repl-readline code to do file completion on tab under two circumstances: 1) within strings 2) when the line starts with `;`.

The fist case is a bit complicated to do properly and the resulting code is not really nice looking, but it mostly works (most common cases such as escaping and similar are covered; I hope I haven't missed anything obvious; the only situation I can think of where it would fail to work properly is a string within an interpolation within a string, but surely there are other failure scenarios if one tries hard enough). Anyway, this is code which is supposed to be short-lived, and I think it's still better than what we have now.