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

Add STDIN support to tsz #51

Open
r10r opened this issue May 13, 2024 · 1 comment
Open

Add STDIN support to tsz #51

r10r opened this issue May 13, 2024 · 1 comment

Comments

@r10r
Copy link

r10r commented May 13, 2024

Is it possible to add STDIN support to tsz ?

I would like to do the following:

dmesg | tsz  --stdin dmesg.txt

Currently you would have to write a temporary file first

dmesg > /tmp/dmesg.txt
tsz /tmp/dmesg.txt
@lonnywong
Copy link
Member

tsz reads the data sent by the client from stdin.

Considering dmesg | tsz --stdin dmesg.txt, the data sent by the client will be received by dmesg.
tsz will not receive the data from the client, unless tsz opens tty to read. And we have to make sure that dmesg ( or other programs ) do not read any data from stdin, otherwise the data received by tsz may be incomplete.

In other words, it would be difficult to support stdin, and it can only be used in limited scenarios.

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