dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.32k stars 656 forks source link

fix(main.py): makes default prompt correctly #1145

Closed hzc989 closed 3 months ago

hzc989 commented 5 months ago

Description

default prompt option not working when exceeds max limit, which is 45 chars.

in this circumstance, only the databasename is show, which is a bit inconvenient and unexpected for information display.

image

Optimization PR

I made a PR to optimize it.

as image shown below, add a default prompt with \n for line splitting, when it exceeds the max length.

image

Checklist

hzc989 commented 5 months ago

this fixes the issue https://github.com/dbcli/mycli/issues/1144

amjith commented 3 months ago

Thank you!

your-diary commented 3 months ago

@hzc989 @amjith Can you consider reverting this PR? I think this PR is not tested well; it breaks an existing important feature. See #1155.