https://github.com/antirez/linenoise/pull/78/files