purebred
purebred copied to clipboard
Query edit: ^W delete-word
Is your feature request related to a problem? Please describe. Query editing is a bit of a pain. Would be handy if ^W would delete-word, make it a bit faster to use.
Rather than re-implementing all the common terminal shortcuts, it might be better to use Haskeline. This is the library that ghci uses for line editing. It has a global config file that the user can tune to his or her own preferences, and has both emacs and vi keybinds!
@BlackCapCoder yeah it would be nice to combine brick and haskeline...
I've found work done here: https://github.com/rootmos/haskeline but the haskeline API is pretty closed at the moment. Therefore I've filed an issue https://github.com/judah/haskeline/issues/118 to ask what's the better way to get brick support into haskeline.
I think we should remove the easyfix tag for this card, since incorporating haskeline is not really an easy fix.
@romanofski agree. Removed tag; changed description to reflect what task has become.
So I've hacked on this for a bit using prior work from https://www.rootmos.io/2017-08-31-combining-brick-and-haskeline.html and https://github.com/judah/haskeline/pull/121. The branch is https://github.com/purebred-mua/purebred/commit/f2e56a9d89fae499f143df29cfe4d89a06f41430 but I'm inclined to wait until https://github.com/judah/haskeline/pull/121 is merged, because without exposed internals in Haskeline, no Brick widget using Haskeline.
@frasertweedale maybe more people would ask for https://github.com/judah/haskeline/pull/121 to be merged? Otherwise we can't really progess with this :)