Trigger completion within GHCi when using :main

56 Views Asked by At

I'm using the optparse-applicative library, which supports Bash-completion. I'd like to trigger such completion when typing :main <tab> within GHCi. Is there a way to instruct GHCi to use the current main function to propose such completion ?

1

There are 1 best solutions below

1
amalloy On

I doubt it. GHCI isn't Bash, so a binary's Bash completion support won't be easily applied. If you look at how completion support works, you'll see it outputs a script to be sourced in a Bash session; I don't see how you would apply such a thing inside of GHCI.