-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe don't delete .pgenv.default.conf #47
Comments
Uhm, I guess it is a matter of taste. The program clearly states that the default configuration file cannot be deleted if there are installed PostgreSQL versions, while it deletes silently when there are no more, that is your case. I think we could either avoid deletion of default configuration or not. The problem is that
Again, I have no particular opinion. We could add a |
I think that's reasonable, no? I suspect most people won't want it deleted, as they will have edited it. That at least was my case (and I kept installing and uninstalling v14.0 as I worked to figure out how to deal with multiple I think we should not delete it.
Well right now
Given all that, I think renaming Does that make sense to you? |
`config init` will create a new existing file with blank settings. See <theory#47 (comment)>
`config nuke` does the same as `config delete` but allows the user to delete the default configuration file. Now `config delete` does not allow for removal of the default configuration file, but `config nuke` allows for the removal of the default configuration file. Specifying `config delete default` or `config nuke` will provide the same behavior, that is deletion of the default configuration. See <theory#47 (comment)>
Introduction to the new behavior of the `config` subcommands. See <theory#47 (comment)>
I think I've implemented what you are looking for, can you see if this sounds good? |
* Append timestamp information to configuration backup file. Use `date` to place a timestamp like string to configuration backup files, created when overwriting an existing configuration file. * Renamed `config write` to `config init`. `config init` will create a new existing file with blank settings. See <#47 (comment)> * Remove backup files when running `config delete`. Since now the configuration files include the timestamp string, the `config delete` command must delete everything that ends in `.backup`. * Split the `config delete` into the `config nuke` command. `config nuke` does the same as `config delete` but allows the user to delete the default configuration file. Now `config delete` does not allow for removal of the default configuration file, but `config nuke` allows for the removal of the default configuration file. Specifying `config delete default` or `config nuke` will provide the same behavior, that is deletion of the default configuration. See <#47 (comment)> * Refactoring of `config write`. Now the command loads the current default configuration and dumps it as the specified file. * Documentation update. Introduction to the new behavior of the `config` subcommands. See <#47 (comment)> * Avoid re-initializing a configuration file if that exists. Check for the existance of the configuration file when `config init` is run and avoid re-doing initialization then. * Remove `config nuke` and leave `config delete default`. The latter is enough explicit to warn the user to do the deletion. * Documentation fix. Remove the `config nuke` references. Explain the workflow of `config init`. * Modified warning message when re-init configuration file. Placed also a debug message to explain which version was in use to double check the program has "guessed" the right file. * Fix warning message for `config delete`. When trying to delete the default configuration by not specifying the version, the warning message provides more details. Also removed a reference to `nuke`. * Update `available` example output Fix documentation. Also, example with a serious editor ;) * Remove the shell '$' prompt from examples. Started by theory, removed everywhere for coherence. * Improve warning message about `config delete`. * Add debug message for `config delete`. * Fix missing escape sequence. Last debug message introduction missed an escape sequence that screwed up all the script. * Bump version number * Four spaces in markdown list * Remove extra blank lines. * Fix shell examples in documentation. Applied 'sh' and '$' prompt coherently across all the examples. Fixed a few markdown lists here and there. Removed the timestamp from the log outputs. * Fix sentences in messages. * Reduce redundancy in debug message. * Fix markdown shell code blocks. Use 'sh' only if there are commands without output, use '$' as prompt only when there is an user input and output.
Closed by #49 |
I'm setting up a new computer so starting from scratch. I installed 14, then
pgenv remove
d it, and was surprised to see that it deleted.pgenv.default.conf
. It probably should not, right?Also,
pgenv write
does not load any config files before it writes them. Shouldn't it at least load.pgenv.default.conf
first?The text was updated successfully, but these errors were encountered: