Skip to content

Commit

Permalink
Fix another 15276 case
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Sep 1, 2020
1 parent 19baa06 commit 238d523
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/REPLMode/completions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ function complete_local_dir(s, i1, i2)
end

cmp = REPL.REPLCompletions.complete_path(s, i2)
cmp2 = cmp[2]
completions = [REPL.REPLCompletions.completion_text(p) for p in cmp[1]]
completions = filter!(x -> isdir(s[1:prevind(s, first(cmp[2])-i1+1)]*x), completions)
completions = let s=s
filter!(x -> isdir(s[1:prevind(s, first(cmp2)-i1+1)]*x), completions)
end
if expanded_user
if length(completions) == 1 && endswith(joinpath(homedir(), ""), first(completions))
completions = [joinpath(s, "")]
Expand Down

0 comments on commit 238d523

Please sign in to comment.