crate / crash

Crash is an interactive CrateDB command line interface (CLI) SQL shell with autocompletion.
Apache License 2.0
48 stars 13 forks source link

Port should always default to `4200` if not specified #440

Open proddata opened 6 months ago

proddata commented 6 months ago

It is confusing that without providing a dedicated port, we don't default to 4200 in all cases, e.g. when specifying to use TLS

e.g.

crash --hosts 'host' --> http://host:4200
crash --hosts 'http://host' --> http://host:80
crash --hosts 'https://host' --> https://host:443
crash --hosts 'https://host:4200' --> https://host:4200

they should all default to port 4200

crash --hosts 'host' --> http://host:4200
crash --hosts 'http://host' --> http://host:4200
crash --hosts 'https://host' --> https://host:4200
crash --hosts 'https://host:4200' --> https://host:4200

This probably will need some improvement here as we just split : 🙈

https://github.com/crate/crash/blob/76e36373f8ad27108e63bf9b5a961d39ceb5fb5f/crate/crash/command.py#L530-L536