Add debug builtin

And refactor setup of jv dump flags.
This commit is contained in:
Nicolas Williams committed 2014-12-27 18:25:34 -06:00
1 parent a9c613e87d
commit 5df20f4954
5 files changed
+65 -17

No files matched your search

+14
View File
@@ -2226,6 +2226,12 @@ sections:
jq itself. These two builtins, and jq's own reading actions, can
be interleaved with each other.
One builtin provides minimal output capabilities, `debug`.
(Recall that a jq program's output values are always output as
JSON texts on `stdout`.) The `debug` builtin can have
application-specific behavior, such as for executables that use
the libjq C API but aren't the jq executable itself.
- title: "`input`"
body: |
@@ -2239,6 +2245,14 @@ sections:
This is primarily useful for reductions over a program's
inputs.
- title: "`debug`"
body: |
Causes a debug message based on the input value to be
produced. The jq executable wraps the input value with
`["DEBUG:", <input-value>]` and prints that and a newline on
stderr, compactly. This may change in the future.
- title: Assignment
body: |