judah / haskeline

A Haskell library for line input in command-line programs.
https://hackage.haskell.org/package/haskeline
BSD 3-Clause "New" or "Revised" License
221 stars 75 forks source link

" " is always inserted after a completion #151

Open oxinabox opened 3 years ago

oxinabox commented 3 years ago

I think it is this code here https://github.com/judah/haskeline/blob/28ee26ad5b4ae1c0584f2ec11ac53be9671bf878/System/Console/Haskeline/Command/Completion.hs#L22

As far as I can tell there is no way to configure this.

Most of the time that behavour is what is wanted, but sometimes it isn't, so it would be good to present a way to write a Completion that doesns't do that.

Example of when it is not wanted is if I have a keyword that must always be followed by a quoted string, then I would like to complete up to and include the openning quote. eg opeopen " but right now that would effectively complete to open " (not the a space after the ")