Add new line on prompt and support history search when using up and down arrows