danvergara / dblab

The database client every command line junkie deserves.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] Idea – Saving the first time configuration

israteneda opened this issue · comments

Is your feature request related to a problem? Please describe.
image
I was using dblab, and I noticed that I had to enter my configuration every time I run dblab without --config flag
Describe the solution you'd like
I think it could be cool to have the option to save the first time configuration, so we can get the existing configuration after the first time I run dblab.
So with don't have to run ./dblab --config every time that we want to run the app.
Describe alternatives you've considered
It works well with --config flag
Additional context
I'm not sure where the configuration could be saved
Also, what happen if I would rather not use the first time configuration anymore 🤔

Sorry, I think I was using an outdated version.
Now when I run dblab without commands/parameters, I get:
Error: empty values required to open a session in database
Is the interactive mode no longer available?

Thanks for bringing this to my attention.
Regarding to the feature request, what we could is leverage the behavior of the command with no flags and do the following:

  • first, look for a config file
  • if no config file present at the current dir, display the interactive menu as usual.

We might remove the --config flag and replace it with --menu to default the interactive menu or override the behavior if a config file is present. Not sure what would be more user friendly tho.

regarding to the second comment, it's a bug related with a limit variable, it's defaulted to 100 and never empty.

Let me fix the bug and then we could proceed with the feature request

@israteneda The bugfix is ready for review, feel free to take a look at it. Not referencing this issue, because it's gonna get referenced in the proper PR.

#91

Regarding to the feature request, what we could is leverage the behavior of the command with no flags and do the following:

first, look for a config file
if no config file present at the current dir, display the interactive menu as usual.

We might remove the --config flag and replace it with --menu to default the interactive menu or override the behavior if a config file is present.

Yeah, that approach sounds good.
Do you think it is possible to save the database configuration in the configuration file, when we run --menu (interactive mode) for the first time.

Regarding to the feature request, what we could is leverage the behavior of the command with no flags and do the following:
first, look for a config file
if no config file present at the current dir, display the interactive menu as usual.
We might remove the --config flag and replace it with --menu to default the interactive menu or override the behavior if a config file is present.

Yeah, that approach sounds good. Do you think it is possible to save the database configuration in the configuration file, when we run --menu (interactive mode) for the first time.

You mean, write a config file with the given information via the interactive mode? That's actually a good idea, but it may change the current UX. We have to test that intensively before to roll it out!