-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Originally posted by @gnprice in #13 (comment):
How about going further: instead of just making this a option, how about we make it the default behavior of toml set?
I feel like for most use cases, you're always going to want to write the edited file back. So it'd be cleaner if you could say simply toml set foo.toml …, rather than saying toml set --overwrite (or whatever we might call this option) all the time.
That would also make it align better with the name "set" than it currently does.
We can always include an option to go back to the other behavior, with a name like --dry-run or --print.
(Yes, this is an incompatible change. But as the README says:
The command's status is experimental. The current interface does not yet serve its purposes as well as it could, and incompatible changes are anticipated.
Making toml set update the actual file on disk is exactly the sort of change I had in mind with that warning.)