Skip to content

Commit

Permalink
Merge pull request #4055 from JuliaLang/backports-release-1.11
Browse files Browse the repository at this point in the history
1.11 backports
  • Loading branch information
IanButterworth authored Oct 21, 2024
2 parents aba90d2 + c83160a commit 9438b6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 2 additions & 0 deletions ext/REPLExt/REPLExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function create_mode(repl::REPL.AbstractREPL, main::LineEdit.Prompt)
end
else
LineEdit.edit_insert(s, ';')
LineEdit.check_for_hint(s) && LineEdit.refresh_line(s)
end
end
end
Expand All @@ -173,6 +174,7 @@ function repl_init(repl::REPL.AbstractREPL)
end
else
LineEdit.edit_insert(s, ']')
LineEdit.check_for_hint(s) && LineEdit.refresh_line(s)
end
end
)
Expand Down
12 changes: 2 additions & 10 deletions ext/REPLExt/completions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function _shared_envs()
possible = String[]
for depot in Base.DEPOT_PATH
envdir = joinpath(depot, "environments")
isdir(envdir) || continue
Base.isaccessibledir(envdir) || continue
append!(possible, readdir(envdir))
end
return possible
Expand Down Expand Up @@ -38,15 +38,7 @@ function complete_expanded_local_dir(s, i1, i2, expanded_user, oldi2)
cmp2 = cmp[2]
completions = [REPL.REPLCompletions.completion_text(p) for p in cmp[1]]
completions = filter!(completions) do x
try
isdir(s[1:prevind(s, first(cmp2)-i1+1)]*x)
catch e
if e isa Base.IOError && e.code == Base.UV_EACCES
return false
else
rethrow()
end
end
Base.isaccessibledir(s[1:prevind(s, first(cmp2)-i1+1)]*x)
end
if expanded_user
if length(completions) == 1 && endswith(joinpath(homedir(), ""), first(completions))
Expand Down

0 comments on commit 9438b6e

Please sign in to comment.