Closed MitchellBerend closed 1 year ago
We should wait for the discussion in #65 to be resolved since this issue might constitute changes in this pr
The file that currently gets generated looks like this
$ cat test-tools.toml
# This file was automatically generated by tool-sync
#
# The directory to store all tools in
#store_directory = "$HOME/.local/bin"
#
#[ripgrep]
# owner = "BurntSushi"
# repo = "ripgrep"
# exe_name = "rg"
#
# # Uncomment to download a specific version or tag.
# # Without this tag latest will be used
# # tag = "latest"
#
#
# Asset name to download on linux OSes
#asset_name.linux = "x86_64-unknown-linux-musl"
#
# uncomment if you want to install on macOS as well
#asset_name.macos = "apple-darwin"
#
# uncomment if you want to install on Windows as well
#asset_name.windows = "x86_64-pc-windows-msvc"
Is this missing anything?
Issues that can be created following this pr The first 2 could maybe all get the tag `good-first-issue
[x] Add a -f|--force
flag to the default-config
sub command to let it overwrite the existing $HOME/.tools.toml
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.
[ ] Always require the --config flag with the default-config command
Would be cool to also say by which version of tool-sync but not sure how to do this without hardcoding the version thinking
We can do some magic in a
build.rs
file that can generate thesrc/config/template.rs
so it contains the version in the config template itself.
@MitchellBerend These new issues look like a good improvement over the existing state of affairs 👍🏻
I'm thinking about a completely alternative design for the config-related commands (e.g. maybe it would be better to have the tool config --default
command and other flags to the config
command?) so I'll create an RFC soon and I'd like to invite you to the discussion. And when it's decided what interface is better, we can continue with other improvements around configs 🚢
I've created an issue to discuss the future interface of all config-related commands:
Resolves #52.
The generate command also uses the --config flag to set the location of the generated file. Would it be a good idea to have some output when actually generating the config? Right now there is no actual response unless there is some file system error.