utop icon indicating copy to clipboard operation
utop copied to clipboard

Completion behavior for quoted text

Open struktured opened this issue 8 years ago • 1 comments

I often (try) to use utop as an interactive shell. Eg. load some code, run some experiment, save some stuff, quit. So when I type an open quote (--> ") into the terminal I'm usually trying to reference a file system resource.

As I don't think this is too rare of a case, it might be good if the default behavior would be instead of no completion, to complete just like utop does already when it encounters special directives like #use or #load.

Perhaps this could be done in an extensible fashion, where certain context is passed to a utop api hook which determines the completion behavior upon typing an open quote.

struktured avatar Nov 16 '15 02:11 struktured

I think that's a good idea. The API hook is an interesting idea but I think a global setting to enable/disable completion on files will be enough initially. I don't have time to work on this right now, but if you provide a patch for it I'll be happy to merge it.

ghost avatar Nov 23 '15 10:11 ghost