File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,8 @@ function complete_path(path::AbstractString;
421
421
cmd_escape= false ,
422
422
string_escape= false ,
423
423
contract_user= false )
424
+ # println("\ncomplete path: $path")
425
+ # println("shell: $shell_escape, cmd: $cmd_escape, string: $string_escape")
424
426
@assert ! (shell_escape && string_escape)
425
427
if Base. Sys. isunix () && occursin (r" ^~(?:/|$)" , path)
426
428
# if the path is just "~", don't consider the expanded username as a prefix
@@ -492,10 +494,8 @@ function complete_path(path::AbstractString,
492
494
end
493
495
startpos = pos - lastindex (prefix) + 1
494
496
Sys. iswindows () && map! (paths, paths) do c:: PathCompletion
495
- # emulation for unnecessarily complicated return value, since / is a
496
- # perfectly acceptable path character which does not require quoting
497
- # but is required by Pkg's awkward parser handling
498
- return endswith (c. path, " /" ) ? PathCompletion (chop (c. path) * " \\\\ " ) : c
497
+ # HACK: Pkg requires escaped backslashes
498
+ return PathCompletion (replace (c. path, " \\ " => " \\\\ " ))
499
499
end
500
500
return paths, startpos: pos, success
501
501
end
You can’t perform that action at this time.
0 commit comments