C - stuck on Multiple completions #wh6

I’m stuck on Multiple completions #wh6

I’ve followed an earlier note to use readline instead of building from scratch and it worked up to this point by hooking custom functions.
This stage requires a specific format of completions, which uses a different separator than the default.

The closest thing I found is rl_completion_display_matches_hook which does the job, but loses the prompt in the process and any extra readline function I call to remedy that gives me a segfault.

Now I wonder if readline is the tool for this job? I must be missing something.