Open debdutdeb opened 3 months ago
since I touched some of the writing logic (logic is the same, unless I made a mistake), added respective tests to check behavior is consistent.
Only outlier is -o -
change. That I mostly did to make it easy to test. I'm ok to remove that if it goes against charm's pr guidelines (mixing changes) which I may have missed.
edit: The pr name choice may have defeated me. I don't know a better name, suggestions are welcome
I'm perhaps leaning towards outputting the file contents if stdout is not a tty.
This could mean you could easily do stuff like:
freeze main.go | pbcopy
this is needed for when we want to write image to a pipe or socket and I can't just name it
blabla.png
.this should fall back on using extension like before if format isn't specified.
treats the format also the same way it did before with extension. logic isn't touched.
what it adds -
freeze main.go -o -