linenoiseHistorySetMaxLen() was broken and never tested. Fixed.
linenosePrompt() -> linenoiseEdit().
Example app improved.