hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

Stop Ctrl-D from terminating session #32

Closed andreasdotorg closed 9 years ago

andreasdotorg commented 9 years ago

Accidentally hitting Ctrl-D will terminate the jackline session immediately, taking away unread messages with it.

hannesm commented 9 years ago

i actually like the ctrl-d behaviour... use it all the time, and works as other command line tools.. but that could very well be customized with a lambda-term-inputrc https://github.com/diml/lambda-term/blob/c29990c5440b2d96191ffa56c0faa16d52c81ef1/man/lambda-term-inputrc.5

andreasdotorg commented 9 years ago

Fair enough. In this case, please put the above link into the README. :)

hannesm commented 9 years ago

well, no clue what to put there tbh and whether it is respected/loaded... needs some investigation

hannesm commented 9 years ago

it is at least loaded (https://github.com/hannesm/jackline/blob/master/cli/jackline.ml#L5) -- missing here: documenting how to do custom key bindings in README

cfcs commented 9 years ago

As per hannes' link above, this can be achieved by creating a ~/.lambda-term-inputrc file containing binding like the one below (binds to "go to end of text", similar to ctrl + e behavior as those keys are very close on a qwerty layout):

[read-line]
C-d: goto-eol
hannesm commented 9 years ago

thanks @cfcs, I now added this to the FAQ (in README.md).