summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bozeman th026106 <thomas.bozeman@digitalglobe.com>2023-10-03 17:50:08 +0000
committerEmanuele Torre <torreemanuele6@gmail.com>2023-10-03 22:48:12 +0200
commit7f547827e47b5ade563a293329deb4226496d72f (patch)
tree7918c86308a5d0caffc97b76a7a120e3023b37cd
parent6b5a18f0369eb765c1c9542cc886d389dac66c50 (diff)
Simplify `pick` example
Old pick example included input array in command line, making `input` confusing and redundant.
-rw-r--r--docs/content/manual/manual.yml2
-rw-r--r--docs/content/manual/v1.7/manual.yml2
-rw-r--r--jq.1.prebuilt4
-rw-r--r--tests/man.test2
4 files changed, 5 insertions, 5 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml
index 6ce8233c..242cf510 100644
--- a/docs/content/manual/manual.yml
+++ b/docs/content/manual/manual.yml
@@ -1065,7 +1065,7 @@ sections:
input: '{"a": 1, "b": {"c": 2, "d": 3}, "e": 4}'
output: ['{"a":1,"b":{"c":2},"x":null}']
- - program: '[1,2,3,4] | pick(.[2], .[0], .[0])'
+ - program: 'pick(.[2], .[0], .[0])'
input: '[1,2,3,4]'
output: ['[1,null,3]']
diff --git a/docs/content/manual/v1.7/manual.yml b/docs/content/manual/v1.7/manual.yml
index f8d9dd29..11e59e1b 100644
--- a/docs/content/manual/v1.7/manual.yml
+++ b/docs/content/manual/v1.7/manual.yml
@@ -1062,7 +1062,7 @@ sections:
input: '{"a": 1, "b": {"c": 2, "d": 3}, "e": 4}'
output: ['{"a":1,"b":{"c":2},"x":null}']
- - program: "[1,2,3,4] | pick(.[2], .[0], .[0])"
+ - program: "pick(.[2], .[0], .[0])"
input: "[1,2,3,4]"
output: ["[1,null,3]"]
diff --git a/jq.1.prebuilt b/jq.1.prebuilt
index a421a502..1f604e26 100644
--- a/jq.1.prebuilt
+++ b/jq.1.prebuilt
@@ -1,5 +1,5 @@
.
-.TH "JQ" "1" "September 2023" "" ""
+.TH "JQ" "1" "October 2023" "" ""
.
.SH "NAME"
\fBjq\fR \- Command\-line JSON processor
@@ -1066,7 +1066,7 @@ jq \'pick(\.a, \.b\.c, \.x)\'
{"a": 1, "b": {"c": 2, "d": 3}, "e": 4}
=> {"a":1,"b":{"c":2},"x":null}
-jq \'[1,2,3,4] | pick(\.[2], \.[0], \.[0])\'
+jq \'pick(\.[2], \.[0], \.[0])\'
[1,2,3,4]
=> [1,null,3]
.
diff --git a/tests/man.test b/tests/man.test
index 822de5ab..07938cd5 100644
--- a/tests/man.test
+++ b/tests/man.test
@@ -249,7 +249,7 @@ pick(.a, .b.c, .x)
{"a": 1, "b": {"c": 2, "d": 3}, "e": 4}
{"a":1,"b":{"c":2},"x":null}
-[1,2,3,4] | pick(.[2], .[0], .[0])
+pick(.[2], .[0], .[0])
[1,2,3,4]
[1,null,3]