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

Is there a reason why CommandLine doesn't have a way to configure its sdtin ? #2360

Open
bric3 opened this issue Jan 9, 2025 · 2 comments
Open

Comments

@bric3
Copy link

bric3 commented Jan 9, 2025

One can write

int status = new CommandLine(new JufmtCommand())
        .setOut(out)
        .setErr(err)
        .execute(args);

I wanted to read from stdin and test this, but I noticed this was missing in the command line API. Maybe there's a reason for it ?

@bric3 bric3 changed the title Is there a reason why CommandLine doesn't have a way to configure its sdtin ? Is there a reason why CommandLine doesn't have a way to configure its sdtin ? Jan 9, 2025
@remkop
Copy link
Owner

remkop commented Jan 9, 2025

Hi @bric3, Picocli does not use the Standard Input stream, so there is no API because it is not used anywhere.

@bric3
Copy link
Author

bric3 commented Jan 10, 2025

Indeed I guessed it. But from a consumer perspective this felt strange to not have stdin, I always picture this trio together.

I know this can be worked around. But do you think this makes sense to have it next to other streams?

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