-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix sort_by
example
#590
Fix sort_by
example
#590
Conversation
See the wiki page on editing documentation: https://github.com/stedolan/jq/wiki/Docs-and-tests Note that sort(f) and sort_by(f) are aliases of each other, so I'm not sure what this actually fixes. If the example given fails, perhaps you aren't using the latest version of jq? |
@slapresta It doesn't work with 1.4: https://jqplay.org/jq?q=sort(.foo)&j=%5B%7B%22foo%22%3A4%2C%20%22bar%22%3A10%7D%2C%20%7B%22foo%22%3A3%2C%20%22bar%22%3A100%7D%2C%20%7B%22foo%22%3A2%2C%20%22bar%22%3A1%7D%5D. |
You need to compile from master. 2014-10-02 17:55 GMT+02:00 Jingwen Owen Ou notifications@github.com:
|
@slapresta So the fix is in master? |
It's not "fixed" because there is no bug. The problem is that you're looking at the documentation for the master version but trying to make it work on 1.4. sort() didn't take arguments back then. |
@slapresta Sure...does it make more sense if the doc is for a released version? I believe there're few people compile |
I agree, some form of versioning for documentation is needed (although you 2014-10-02 18:01 GMT+02:00 Jingwen Owen Ou notifications@github.com:
|
Closing it and hope this raises awareness a bit |
It is important to remember that there are two places the documentation can be found. If the documentation on the website isn't correct for 1.4, that IS an issue and it needs to be handled. In this case, the 1.4 docs say that sort/1 exists, when it definitely doesn't for 1.4. @jingweno, if you'd like to redo the pull request by editing manual.yml as in https://github.com/stedolan/jq/wiki/Docs-and-tests, that would be great. When you submit the pull request, add a note that it is for the 1.4 docs and we'll make sure it makes it out to the site. |
@wtlangford wrote:
Yes, it has been noted before, e.g. #552 (comment) |
Personally, I like the version tags. That being said, features not in an
|
FYI, I'm going to remove the |
Seems logical. What are your thoughts on the version stamping in the docs?
|
FYI, i found out this issue when people run the example on jqplay.org: https://twitter.com/statemachine/status/517321978219229184 |
@nicowilliams wrote:
Great. As a reminder, the following sentence in http://stedolan.github.io/jq/manual should be revised (ASAP?):
|
No description provided.