chshersh / tool-sync

🧰 Download pre-built binaries of all your favourite tools with a single command
https://crates.io/crates/tool-sync
Mozilla Public License 2.0
69 stars 16 forks source link

Add a force flag to the default-config command to let it overwrite the existing $HOME/.tools.toml #72

Closed MitchellBerend closed 1 year ago

MitchellBerend commented 1 year ago

Referencing #62

If the --config flag is specified, the default configuration is saved in the explicitly specified path. If this file already exist, ask interactively whether user want's to change it. And if the answer is "yes" then override it. The defaulg-config command can also accept the -f|--force flag to ignore interactive question.

MitchellBerend commented 1 year ago

This looks like a good candidate for the first-good-issue label to me.

chshersh commented 1 year ago

Indeed, sounds like a good first issue 🙂

I'd love to get a decision on #75 first though before we invest a lot into the current design.

chshersh commented 1 year ago

@MitchellBerend Do you still think that we want to implement it?

I think that

tool default-config > ~/.tool.toml

Is shorter and clearer than

tool --config=~/.tool.toml default-config --force
MitchellBerend commented 1 year ago

tool default-config > ~/.tool.toml

I agree with this, thinking about this from a new users perspective they might run this command and see it print the config to stdout and (on unix) they will probably redirect that to a file anyway. Unless there is some command in the future that edits/augments the config file automatically (like #90 or #92 perhaps) I think we should stay as close to that as possible.

chshersh commented 1 year ago

In that case, I'm closing this issue for now 🙂 We can always reopen it later.