tool-sync
                                
                                 tool-sync copied to clipboard
                                
                                    tool-sync copied to clipboard
                            
                            
                            
                        [RFC] Update the config with the new tool in the 'install' command
The install command just installs the tool. It would be nice if it also updates the config, so the future tool sync calls would sync the tool.
The behaviour should be following:
- [ ] Check if the tool is already in config
- [ ] If not, add it to the end of the configuration file
- [ ] Write an information message saying that the configuration file was updated
Alternative
Possible two behaviours:
- This is done under the flag --update-configfor theinstallcommand and the default is to not update the config
- This is done by default and can be disabled with the --no-update-configflag
I'm not sure which default is better here 🤔 Maybe the one that doesn't change the config? Or maybe people actually want this behaviour out-of-the-box?
The feature is inspired by this comment:
- https://www.reddit.com/r/rust/comments/x1d3of/comment/img2osl/?utm_source=reddit&utm_medium=web2x&context=3
We could also add a prompt for the user along side one of these options if no flag is provided? That way there is no default that can mess up the config.
I'm leaning towards the --update-config option for two reasons:
- According to CLI Guidelines, tools shouldn't mutate user-facing files unless specified explicitly.
- One possible use case for the tool install xyzis to install a tool, play with it locally and decide whether you actually want it or not. So you may not want to add it to the config by default but decide later.