Add option to insert newline when prompt is long

Created by: PandaWill

Add new setting LP_MINIMUM_CMD_LENGTH, which controls when a newline is added. Setting defaults to 0 (disabled).

See feature request #599.

I had to use perl for removing the non-printable characters from the prompt. It doesn't feel like the nicest solution, but I couldn't remove them with bash pattern matching or sed. This was due to the requirement to match the 2 characters at the end of each block: \] .

Let me know if there's anything you'd like changed, I'm keen to do all I can to get this merged. I only discovered this project recently and it's almost perfect - this is the missing piece of the puzzle for me!

Merge request reports