edgedb / edgedb-cli

The EdgeDB CLI
https://www.edgedb.com/docs/cli/index
Apache License 2.0
166 stars 23 forks source link

We should populate the prompt with `sys::get_current_database()` #1250

Closed msullivan closed 6 months ago

msullivan commented 7 months ago

Currently:

_localdev:edgedb> select sys::get_current_database();
{'main'}

It would be better if it said _localdev:main>

1st1 commented 7 months ago

Yes, with branches it's now essential

quinchs commented 7 months ago

Seems like this is already in the CLI:

> edgedb -I test -b test_branch
EdgeDB 5.0-dev.8154+3acd9a4 (repl 4.3.0-dev.1110+93964fb)
Type \help for help, \quit to quit.
test:test_branch>

...

> edgedb -I test -d test_branch
database connection argument is deprecated in favor of 'branch'
EdgeDB 5.0-dev.8154+3acd9a4 (repl 4.3.0-dev.1110+93964fb)
Type \help for help, \quit to quit.
test:test_branch>
msullivan commented 7 months ago

@quinchs The point is that the default branch should be correct, whether it is edgedb or main, even if the user didn't specify it