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

doc: no need to include . in example #3026

Closed
wants to merge 1 commit into from
Closed

doc: no need to include . in example #3026

wants to merge 1 commit into from

Conversation

KnorpelSenf
Copy link

@KnorpelSenf KnorpelSenf commented Jan 30, 2024

If I recall correctly, jq . was necessary a long time ago in order to process stdin. It is more intuitive to just pipe to jq, so I believe this should be the minimal example in the help text.

Would you also like to see a sentence stating that . is implied if no arguments are passed?

@nicowilliams
Copy link
Contributor

Allowing the program to be optional in some cases turned out to be a bad idea. I don't think we should encourage that. So I think we must reject this PR.

@KnorpelSenf
Copy link
Author

That's alright, understood. Why is it a bad idea? :)

@KnorpelSenf KnorpelSenf deleted the no-dot branch January 31, 2024 07:05
@pkoppstein
Copy link
Contributor

@KnorpelSenf asked:

Why is it a bad idea?

By most accounts, it's a fine idea but there's another fine idea that (in practice) causes complications of the "feature interaction" variety. The other idea is that if invoked by itself (without anything on STDIN), jq should emit its help text. The complications involve implementation details and portability, and achieving agreement on what "user expectations" are or should be assumed to be.

@nicowilliams
Copy link
Contributor

@KnorpelSenf the issue is that the rules for when the program can be elided and defaulted to . and when it can't aren't easy for users to internalize, so it has caused lots of issues to be opened here. Thus I would like to rip out this feature.

@nicowilliams
Copy link
Contributor

That said, thank you for your contribution!

@KnorpelSenf
Copy link
Author

Fascinating, I have not run into that yet. Thanks for elaborating!

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.

3 participants