dbcli / mycli

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

Include TiDB in the prompt #1068

Closed dveeden closed 1 year ago

dveeden commented 1 year ago

Description

Include TiDB in the prompt

See also: https://github.com/dbcli/mycli/tree/tidb

Checklist

amjith commented 1 year ago

Thank you! I'll let the CI tests finish and merge it in.

dveeden commented 1 year ago

Thanks.

You can also get the keywords from https://github.com/pingcap/tidb/blob/master/parser/parser.y#L73

Maybe use something like this:

awk '/The following tokens belong/ { print; kw=1 } /builtinBitAnd/ { exit } { if (kw == 1) { print $2 }}' parser/parser.y

And besides the HTML version of the docs there is https://github.com/pingcap/docs/blob/master/keywords.md