Hey there. Thanks for sharing this super handy tool! I'd like to use it for editing toml configuration files inside container builds and noticed there was no support for appending values to arrays, so I've added it along with a few tests.
You can now append <KEY> <VALUE> which returns the previous array or nothing if it didn't exist. Errors if the key exists but is not an array.
I feel like the code could be factored here and there as this creates a few redundancies but I preferred to keep the diff as simple as possible rather than starting shaving the yak. Hope this is fine.
Let me know if there's anything else I should do.
Cheers!
Hey there. Thanks for sharing this super handy tool! I'd like to use it for editing toml configuration files inside container builds and noticed there was no support for appending values to arrays, so I've added it along with a few tests.
You can now the key exists but is not an array.
append <KEY> <VALUE>
which returns the previous array or nothing if it didn't exist. Errors ifI feel like the code could be factored here and there as this creates a few redundancies but I preferred to keep the diff as simple as possible rather than starting shaving the yak. Hope this is fine.
Let me know if there's anything else I should do. Cheers!