dbcli / mycli

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

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

Closed hzc989 closed 8 months ago

hzc989 commented 10 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 10 months ago

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

amjith commented 8 months ago

Thank you!

your-diary commented 7 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.