Bug #92048 MySQL Shell new line wrong position
Submitted: 16 Aug 2018 20:51 Modified: 29 Aug 2018 13:26
Reporter: Frederic Descamps Email Updates:
Status: Closed Impact on me:
None 
Category:Shell General / Core Client Severity:S3 (Non-critical)
Version:8.0.12 OS:Any
Assigned to: Alfredo Kojima CPU Architecture:Any

[16 Aug 2018 20:51] Frederic Descamps
Description:
Hi, 

I would like to have the wonderful shell prompt on one line and the possibility to write my statement on the line below.
However if my statement is on multiple line, the second line will have a wrong starting position as it seems to keep the prompt size + one character (the \n I guess). 
See attachment.

How to repeat:
Use the json prompt in attachment, use \sql mode an enter a two line statement.

Suggested fix:
If '\n' is used to end the prompt, put the starting position to 1 again.
[16 Aug 2018 20:53] Frederic Descamps
output

Attachment: Selection_557.png (image/png, text), 64.78 KiB.

[16 Aug 2018 20:55] Frederic Descamps
prompt configuration

Attachment: prompt.json (application/json, text), 2.32 KiB.

[17 Aug 2018 5:48] MySQL Verification Team
Hello Frederic,

Thank you for the report!

regards,
Umesh
[29 Aug 2018 13:26] Margaret Fisher
Posted by developer:
 
Changelog entry added for MySQL Shell 8.0.13:

A number of improvements have been made to the MySQL Shell prompt, including handling of overlength text, statement splitting, and support for multiple-line prompts. New sample prompt theme files are provided for double-line prompts that use one line for information display and a new line for the input prompt itself, so that additional information can be shown without detracting from the space available for text entry.