REPL.TerminalMenus.MultiSelectMenu: aborted vs. nothing selected

In both cases it returnes empty array, though it’s obviously not (always) the same?

Is it possible to change the behavior? After reading the Julia docs on TerminalMenus I’m no wiser than before. :frowning:

AbstractMenu extension interface mentions the function cancel(m::AbstractMenu), but what should I do with it? How to change the following code to get e.g. nothing on abort?

menu = MultiSelectMenu(["a", "b", "C"])
r = request(menu)

OK, looked into the source code, and can now think of two options, none of each I’d really like.

  • Commit an act of piracy:
REPL.TerminalMenus.cancel(m::MultiSelectMenu) = error("aborting !") 

I could also provide my own error type, then catch and process it correspondingly.

  • Or implement my own type AbortableMultiSelectMenu, basically copying the source of MultiSelectMenu with some adaptations, e.g. with the cancel function as above.

Any other ideas?