dbcli/litecli

use \033 in prompt

one-pyy opened this issue · 5 comments

In mycli:
image
In litecli:
image

@one-pyy If you're feeling generous this could be an opportunity to contribute some code and make litecli feature compatible with mycli.

Looks like you just need to run the prompt string through the ANSI() function that comes built in with prompt-toolkit.

Here's how this is implemented in mycli: https://github.com/dbcli/mycli/blob/main/mycli/main.py#L617

You might want to open a PR for litecli that implements this feature. :)

Thank you very much for your reply

I'm very sorry, I tried to change the source code, then it reported an error and I couldn't find a way to fix it. So I may not be able to contribute some code (ノへ ̄、)

@one-pyy Can you try out the branch that has this feature implemented?

You can install from the branch using the following command:

pip install -U https://github.com/dbcli/litecli/archive/refs/heads/ansi-support.zip

image
Thank you very much for your help, it works!
♪(・ω・)