From 3cfac051c72caf6696d1a7f87e7fb58ad4203b5e Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Sat, 15 Apr 2023 12:22:18 -0700 Subject: [PATCH] docs: small grammar fixes --- doc/QUERY.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/QUERY.md b/doc/QUERY.md index f5757c7..8ae6d46 100644 --- a/doc/QUERY.md +++ b/doc/QUERY.md @@ -118,7 +118,7 @@ hpi query my.coding.commits.commits --order-type datetime --before now --within 6 ``` -Because that is such a common use case, the `--recent` flag is a shorthand for `--order-type datetime --reverse --before now --within`. The same as above: +Because grabbing data `--before now` is such a common use case, the `--recent` flag is a shorthand for `--order-type datetime --reverse --before now --within`. The same as above, to get the commits from the last day: ``` hpi query my.coding.commits.commits --recent 1d | jq length @@ -161,7 +161,7 @@ aec517e53c6ac022f2b4cc91261daab5651cebf0 b0ff6f29dd2846e97f8aa85a2ca73736b03254a8 ``` -`select` acts on a stream of JSON objects, not a list, so it filters as the objects are generated. The alternative would be to print the entire JSON list at the end, like: +`jq`s `select` acts on a stream of JSON objects, not a list, so it filters as the objects are generated. The alternative would be to print the entire JSON list at the end, like: `hpi query my.coding.commits.commits --recent 30d | jq '.[] | select(.repo | contains("Repos/HPI"))' | jq '.sha' -r`, using `jq '.[]'` to convert the JSON list into a stream of JSON objects.