Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to write moar buffer to a file or to stdout #135

Open
koraa opened this issue May 11, 2023 · 6 comments
Open

Ability to write moar buffer to a file or to stdout #135

koraa opened this issue May 11, 2023 · 6 comments

Comments

@koraa
Copy link

koraa commented May 11, 2023

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.

@walles
Copy link
Owner

walles commented May 11, 2023

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!

@koraa
Copy link
Author

koraa commented May 11, 2023

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

@walles
Copy link
Owner

walles commented May 12, 2023

Right, so once inside of moar, you'd like to press some button, which would make moar save its buffer contents to a file?

@koraa
Copy link
Author

koraa commented May 12, 2023

Precisely.

@walles
Copy link
Owner

walles commented May 18, 2023

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?

@koraa
Copy link
Author

koraa commented May 18, 2023

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants