Open koraa opened 1 year ago
You can already do echo hello | moar > hello.txt
.
Is this what you want to do?
If not, an example of how you'd like this to work would help!
No, I am well aware of redirection. Its more like:
$ some_really_expensive_command | moar
$ some_really_expensive_command > myfile.txt # Shit I really should have written this to a file
Right, so once inside of moar
, you'd like to press some button, which would make moar
save its buffer contents to a file?
Precisely.
The title here says "or to stdout".
I can see the use case for sending to a file, but what about stdout
?
Let's say I only did to file and not to stdout
. Wouldn't that solve the whole use case of Shit I really should have written this to a file
?
There would be some utility in user-in-the-loop data processing pipelines; opening multiple files and deciding which ones to process. Although if you write to a file, you can always write to "/dev/stdout"
Hi thank you for writing this awesome tool!
I propose adding the ability to write the buffer to a file or stdout; this allows me not to have to think about whether I need to do do something with the output of a command and would greatly facilitate use cases such as paging every command through moar by default as a shell feature.