summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Wadman <mattias.wadman@gmail.com>2022-01-07 11:08:58 +0100
committerNico Williams <nico@cryptonector.com>2022-05-26 16:02:50 -0500
commitf2ad9517c72f6267ae317639ab56bbfd4a8653d4 (patch)
treee210b1e24fdc1d7b5b3368dff59931a2169d29f9
parentc4d39c4d22f2b12225ca1b311708f7e084ad9ff8 (diff)
Mention -n in IO-section and for input/inputs
-rw-r--r--docs/content/manual/manual.yml12
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml
index 074689b1..8cec7bcb 100644
--- a/docs/content/manual/manual.yml
+++ b/docs/content/manual/manual.yml
@@ -2924,7 +2924,9 @@ sections:
are provided for this, `input` and `inputs`, that read from the
same sources (e.g., `stdin`, files named on the command-line) as
jq itself. These two builtins, and jq's own reading actions, can
- be interleaved with each other.
+ be interleaved with each other. They are commonly used in combination
+ with the null input option `-n` to prevent one input from being read
+ implicitly.
Two builtins provide minimal output capabilities, `debug`, and
`stderr`. (Recall that a jq program's output values are always
@@ -2944,13 +2946,19 @@ sections:
Outputs one new input.
+ Note that when using `input` it is generally be necessary to
+ invoke jq with the -n command-line option, otherwise
+ the first entity will be lost.
+
- title: "`inputs`"
body: |
Outputs all remaining inputs, one by one.
This is primarily useful for reductions over a program's
- inputs.
+ inputs. Note that when using `inputs` it is generally necessary
+ to invoke jq with the -n command-line option, otherwise
+ the first entity will be lost.
- title: "`debug`"
body: |