Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion stdlib/REPL/src/REPLCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,12 @@ function complete_path(path::AbstractString, pos::Int; use_envpath=false, shell_
end

function complete_expanduser(path::AbstractString, r)
expanded = expanduser(path)
expanded =
try expanduser(path)
catch e
e isa ArgumentError || rethrow()
path
end
return Completion[PathCompletion(expanded)], r, path != expanded
end

Expand Down
3 changes: 3 additions & 0 deletions stdlib/REPL/test/replcompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,9 @@ let s, c, r
s = "\"~"
@test "tmpfoobar/" in c
c,r = test_complete(s)
s = "\"~user"
c, r = test_complete(s)
@test isempty(c)
rm(dir)
end
end
Expand Down