xo / usql

Universal command-line interface for SQL databases
MIT License
8.81k stars 346 forks source link

Dashes in connections names in config.yaml cause warnings/errors #470

Open mapperr opened 3 weeks ago

mapperr commented 3 weeks ago

Hi,

I defined a connection like this in my config.yaml:

connections:
  my-db: 'mysql://mydatabase.example.com:3306/myvay'

and I noted, in general, that using a connection name with dashes in config.yaml cause an warning like:

warning: named connection "my-db" was not defined: invalid identifier

and if I try to connect to that with \c my-db I get:

error: invalid database scheme

If I rename my-db to my_db all works as expected.

Should we add this info to the README (I wasnt able to find any hint) or it is a bug?