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 support for parsing stdin in CLI #880

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Conversation

mgradowski
Copy link
Contributor

Hey! The CLI is missing a way to read files or output from other tools, which is essential for my use case (statements with hundreds of LOC). My contribution is a pretty low effort way to add it.

I decided to use - as a sentinel value [1] to indicate that the CLI should parse the stdin instead of argv for two reasons:

  1. It's an established convention in many of GNU coreutil tools [2].
  2. I don't think there's a dialect for which - would parse successfully.

[1] https://en.wikipedia.org/wiki/Sentinel_value
[2] https://www.gnu.org/software/coreutils/manual/coreutils.html#Common-options

@tobymao tobymao merged commit f89b38e into tobymao:main Jan 3, 2023
@tobymao
Copy link
Owner

tobymao commented Jan 3, 2023

thanks

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

Successfully merging this pull request may close these issues.

2 participants