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

Missing IsTerminal::is_terminal for files and stdin #6407

Open
ventaquil opened this issue Mar 16, 2024 · 1 comment
Open

Missing IsTerminal::is_terminal for files and stdin #6407

ventaquil opened this issue Mar 16, 2024 · 1 comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-io Module: tokio/io M-process Module: tokio/process S-blocked-on-msrv Status: need an MSRV bump to progress

Comments

@ventaquil
Copy link

Is your feature request related to a problem? Please describe.

As far as I see (correct me if I'm wrong) I don't see any IsTerminal::is_terminal alternative known from std lib.

None of tokio::fs::File nor tokio::io::Stdin doesn't have any IsTerminal implementation.

Are there plans to change it soon?

Describe the solution you'd like

I am not familiar with async world but maybe those structs should just impl std::io::IsTerminal?

@ventaquil ventaquil added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Mar 16, 2024
@maminrayej maminrayej added the S-blocked-on-msrv Status: need an MSRV bump to progress label Mar 17, 2024
@maminrayej
Copy link
Member

tokio::fs::File is supposed to be used with real files since it assumes you have to use blocking IO to interact with the file which may not be true for files representing a terminal. But, I believe it makes sense to implement IsTerminal for stdin/stdout/stderr. Still, we need an MSRV bump to make progress on this.

@Darksonn Darksonn added M-io Module: tokio/io M-process Module: tokio/process labels Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-io Module: tokio/io M-process Module: tokio/process S-blocked-on-msrv Status: need an MSRV bump to progress
Projects
None yet
Development

No branches or pull requests

3 participants