diff options
author | Mattias Wadman <mattias.wadman@gmail.com> | 2021-06-09 16:02:22 +0200 |
---|---|---|
committer | Nico Williams <nico@cryptonector.com> | 2022-05-26 16:04:32 -0500 |
commit | cff5336ec71b6fee396a95bb0e4bea365e0cd1e8 (patch) | |
tree | d67d5542df1f16d1a48e1fb75749f60482cd874b | |
parent | f2ad9517c72f6267ae317639ab56bbfd4a8653d4 (diff) | |
download | jq-master.tar.gz |
-rw-r--r-- | docs/content/manual/manual.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml index 8cec7bc..442fc0d 100644 --- a/docs/content/manual/manual.yml +++ b/docs/content/manual/manual.yml @@ -1664,6 +1664,22 @@ sections: input: '1' output: ['[1,2,4,8,16,32,64]'] + - title: "`repeat(exp)`" + body: | + + The `repeat(exp)` function allows you to repeatedly + apply expression `exp` to `.` until an error is raised. + + Note that `repeat(exp)` is internally defined as a + recursive jq function. Recursive calls within `repeat` will + not consume additional memory if `exp` produces at most one + output for each input. See advanced topics below. + + examples: + - program: '[repeat(.*2, error)?]' + input: '1' + output: ['[2]'] + - title: "`until(cond; next)`" body: | |