haskell / haskeline

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

[Feature request] readline's completion-ignore-case #84

Open wizzup opened 6 years ago

wizzup commented 6 years ago

It would be nice if completion can be case-insensitive. Different behavior in bash prompt and ghci prompt drive me crazy.

ibispi commented 6 years ago

A friend of mine (who doesn't have a github account) has sent you a patch (via email) dealing with this. Did you receive it?

wizzup commented 6 years ago

I can't find any. Can you fork the repo and open the pull request so everyone can take a look?

Also this might related to PR #7

ibispi commented 6 years ago

My friend says: (mail sent). In case anyone wants to check the patch, here it is http://paste.debian.net/plainh/ec5ae904

wizzup commented 6 years ago

Thanks, I just put the patch on. I will see if I can make my ghci use this patched haskline.

I will not create a PR because I am not patch's author.

judah commented 6 years ago

The title of this PR mentions completion-ignore-case, which would be equivalent to having a new user preference in ~/.haskeline. In contrast, the patch @wizzup linked would be more about enabling individual applications to choose to implement it themselves.

It seems the former might be a better option (or at least more general) and would more directly resolve the corresponding GHC ticket (https://ghc.haskell.org/trac/ghc/ticket/15452). However, I'm not sure yet whether it's feasible the way Haskeline's API is currently set up. I'll aim to take a closer look at the code in the next few days.

wizzup commented 6 years ago

to having a new user preference in ~/.haskeline

That what I really want.