request: output to temporary file
Would it be possible to add a command that creates a new temporary file with the output instead of replacing the selection/entire file? Something like Filter Text vs Filter Text Inplace of the FilterText extension.
Hi @stessaris sorry for my late reply and thanks for the suggestion. Sounds good. Do you want to provide a use case you have in your mind?
Often I find myself converting or filtering data by chaining commands with pipes, e.g. using jq with JSON or awk. Sometimes the whole file, other times just a part of it. In these cases I don't want to replace the original text but to generate a new file. Right now I do it by copying the text and using the terminal window with pbpaste | filter | code -, but it's less than ideal since requires a lot of irrelevant typing and the the generated temporary file blocks the terminal until saved.
Cool thanks for the additional context. I also sometimes want to do text processing without modifying the original text; I copy the text into a new tab then run this plugin to process, probably the similar operational cost. If the processed bit automatically populated into a tab, it would be it's one less step 👍