dbcli / litecli

CLI for SQLite Databases with auto-completion and syntax highlighting
https://litecli.com
BSD 3-Clause "New" or "Revised" License
2.12k stars 68 forks source link

Prompt with D*** db names #65

Open pydemo opened 5 years ago

pydemo commented 5 years ago

Prompt for db DY_DeskPLRSRange03.db becomes this

C:\temp\liteFri Jul 26 17:21:37 2019Y_DeskPLRSRange03.db>

probably \D is treated as sysdate?

amjith commented 5 years ago

You're right. That's an interesting issue. I wonder if there is an easy way to detect whether the \D is part of the prompt or path. :thinking:

thorstenkampe commented 3 years ago

Same issue here:

> litecli  --prompt "[\d]> " --database F:\cygwin\home\thorsten\.jupyter\nbsignatures.db
Version: 1.4.1
Mail: https://groups.google.com/forum/#!forum/litecli-users
GitHub: https://github.com/dbcli/litecli
[F:\cygwin\home\thorsten\.jupyter
bsignatures.db]>

An easy fix would be to replace all backslashes with slashes:

> litecli  --prompt "[\d]> "  --database F:/cygwin/home/thorsten/.jupyter/nbsignatures.db
Version: 1.4.1
Mail: https://groups.google.com/forum/#!forum/litecli-users
GitHub: https://github.com/dbcli/litecli
[F:/cygwin/home/thorsten/.jupyter/nbsignatures.db]>