Skip to content

Commit

Permalink
Add documentation for exec/2
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicToast committed May 31, 2024
1 parent 36e0a3d commit 4cd4156
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/content/manual/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3271,6 +3271,12 @@ sections:
builtin outputs its input in raw mode to stder with no additional
decoration, not even a newline.
Additionally, jq has support for executing "external filters" provided by
other executables. This functionality is provided by `exec`, but may not
be available on all platforms, and does not necessarily integrate well
with other jq features. It is intended to perform smaller processing that
is otherwise impossible to perform in jq itself.
Most jq builtins are referentially transparent, and yield constant
and repeatable value streams when applied to constant inputs.
This is not true of I/O builtins.
Expand Down Expand Up @@ -3344,6 +3350,15 @@ sections:
Returns the line number of the input currently being filtered.
- title: "`exec(path; [args…])`"
body: |
Spawns a new process of path with arguments args. Pipes its input
converted to a string as the stdin of the process. The output of the
process is coalesced and outputted as a string. Note that this output
will include any terminating newlines, so you may want to add an
rtrim after this filter, or use a wrapper.
- title: 'Streaming'
body: |
Expand Down
6 changes: 6 additions & 0 deletions jq.1.prebuilt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4cd4156

Please sign in to comment.