microtodd / yamledit

A python YAML commandline editor
MIT License
2 stars 2 forks source link

Should support in-place editing #7

Open aspiers opened 6 years ago

aspiers commented 6 years ago

Would be helpful if in-place editing was supported, just like perl -pi.bak and sed -i.bak.

microtodd commented 6 years ago

That shouldn't be too hard. Add the "-i" option, create a new temp file, treat the temp file as "-o", then when done just replace in place.