Providing custom REPL PathCompletions

Hierarchical dataformats such as HDF5.jl and JLD2.jl
use path-like strings to refer to datasets, e.g.

julia> using JLD2
julia> f = jldopen("20200918_02_rodcell_bigdomain000012.h5")
┌ Warning: This file was not written with JLD2. Some things may not work.
└ @ JLD2 /.../.julia/dev/JLD2/src/JLD2.jl:378
JLDFile /.../20200918_02_rodcell_bigdomain000012.h5 (read-only)
 └─📂 20200918_02_rodcell_bigdomain000012
    ├─📂 completeStates
    │  ├─📂 initialState
    │  │  ├─🔢 phi
    │  │  ├─🔢 attached
    │  │  ├─📂 reg
    │  │  │  └─ ⋯ (3 more entries)
    │  │  └─ ⋯ (12 more entries)
    │  └─📂 finalState (15 entries)
    └─ ⋯ (7 more entries)

julia> f["20200918_02_rodcell_bigdomain000012/completeStates/finalState/t"]
300.0000109540947

It would be super useful to be able to use tab-completion when accessing these structures.
Currently, these path completions are essentially hard-coded in REPL.REPLCompletions
( julia/REPLCompletions.jl at 9b1ffbbe1bce1eaf3327535ae3e46e923e8d9aff · JuliaLang/julia · GitHub )

My experimental PR for JLD2 just overwrites this definition and the REPL will then offer tab completions for currently open files as well:

julia> "/
.config/                              20200918_02_rodcell_bigdomain000012/  bin/                                  boot/
etc/                                  home/                                 lib/                                  lib32/
...

julia> "/20200918_02_rodcell_bigdomain000012/
completeStates/  parameters/      particleType     repoVersion      runinfo/         snapshots/       version          worldType
julia> "/20200918_02_rodcell_bigdomain000012/completeStates/
finalState/    initialState/
julia> "/20200918_02_rodcell_bigdomain000012/completeStates/

Of course, I can’t just overwrite that function in JLD2 but if there were an official way to supply the REPL or an IDE with tab completions (for strings) that would be a real quality of life improvement in this context.