Commit Graph
102 Commits
Author SHA1 Message Date
itchyny 0ecededefa Remove deprecated filters: leaf_paths, recurse_down 2023-07-07 10:53:40 -05:00
pkoppstein c68ad08805 manual.yml: pick(pathexps)
Change formal parameter name
2023-07-05 23:48:31 -05:00
pkoppstein 416e8ada7d builtin: add pick(stream)
pick(stream) works on both arrays and objects

Restrictions on the dot-paths are specified in manual.yml

See #2578
2023-07-05 23:48:31 -05:00
Mattias Wadman 12ce4e3b54 Support optional else-branch for if-then-elif-end (#2598) 2023-07-04 07:51:29 +09:00
pkoppstein 83f375cc83 Revamp sub/3 to resolve most issues with gsub (and sub with "g") (#2641)
The primary purpose of this commit is to rectify most problems with
`gsub` (and also `sub` with the `g` option), in particular fix #1425 ('\b'),
fix #2354 (lookahead), and fix #2532 (regex == `"^(?!cd ).*$|^cd "`).

This commit also partly resolves #2148 and resolves #1206 in that
`gsub` no longer loops infinitely; however, because the new `gsub`
depends critically on `match/2`, the behavior when regex == `""` is
sometimes non-standard.

The documentation has been updated to reflect the fact that `sub`
and `gsub` are intended to be regular in the second argument.

Also, `_nwise/1` has been tweaked to take advantage of TCO.
2023-07-04 07:46:29 +09:00
pkoppstein 3c76a5b3f3 manual.yml: fix references to javascript, and clarify semantics of == (#2645)
remove inaccurate and confusing references to javascript; clarify semantics of ==
2023-07-03 12:35:41 +09:00
itchyny 4b5fcb936f Fix the default search paths and documentation (#2093) 2023-07-03 09:12:22 +09:00
itchyny f88c4e5888 Move an example to the manual and regenerate man.test (#2639) 2023-06-30 07:45:29 +09:00
itchyny 6864aa8630 Fix manual section titles, minor typos, and improve inline codes (#2626) 2023-06-22 08:31:38 +09:00
Alex Jurkiewicz dd5ce98caf Document length for numbers and bools (#2625)
This was added in ae7a042876 but not explicitly documented.
2023-06-21 18:21:39 +09:00
Dawid Ferenczy Rogožan 11d909170e Added usage under Powershell to the manual (#2306) 2023-06-16 22:47:37 +09:00
pkoppstein d2f1ddbd5a manual.yml - Perl NG (#2614) 2023-06-16 07:59:48 +09:00
Rob Wills 9cb69ad5a5 Add a note about how to provide positional arguments without confusing the arg parser (#1989) 2023-06-14 08:45:02 +09:00
itchyny 2e5c3f490c Fix regular expression section on PCRE (fix #2439), also improve example format (#2613) 2023-06-14 07:36:06 +09:00
Josh Soref 5cebe86a7b Fix misspellings (#2609) 2023-06-13 20:01:20 +09:00
AJ Jordan 840dc55263 Link to the Onigurama docs (#2355) 2023-06-13 13:49:46 +09:00
itchyny fd9da6647c docs: Fix example outputs added in #2391 2023-06-07 21:05:03 +09:00
Benjamin Wuethrich e066172aa1 Add fixes for manual (#2391) 2023-06-07 20:59:07 +09:00
Timothy John Perisho Eccleston a87dca3c87 fix typos in manual.yml (#2102) 2023-06-07 20:58:48 +09:00
itchyny b8816caf0a docs: Fix a try-catch example (fix #1558, #1777) (#2605) 2023-06-06 09:03:25 +09:00
Henré Botha df8ee8dd79 docs: fix typo in halt_error example (#2336) 2023-06-06 08:36:46 +09:00
Lucas Trzesniewski b7f9587bb9 docs: clarify split behavior (#2462) 2023-06-06 08:28:57 +09:00
Matti Åstrand b7511b9b1f Key should be "foo" without spaces (#2212) 2023-06-06 06:17:35 +09:00
itchyny c815794e4b Replace find with select function as the example of jq-coded functions (#1962) 2023-06-06 06:09:03 +09:00
itchyny 4e9a1a8037 Show missing backslash in manual (#2492) 2023-06-06 06:03:58 +09:00
zstadler a5ba98a55c Show missing backslash in manual (#2492) 2023-06-06 06:03:07 +09:00
itchyny 019a9ffbee Improve docs of optional indexing syntax to make it clear (ref #2588) (#2604)
* Revert "Typo in basic filters manual (#2588)"

This reverts commit 908f5d54a7.

* Improve docs of optional indexing syntax to make it clear
2023-06-06 05:43:06 +09:00
Benoit de ChezellesandOwen Ou 908f5d54a7 Typo in basic filters manual (#2588)
Co-authored-by: Owen Ou <169064+owenthereal@users.noreply.github.com>
2023-06-04 22:29:55 -07:00
Stephen Dolan 89caf46a5f Update URLs from stedolan to jqlang 2023-05-28 17:06:31 +01:00
Mattias Wadman cff5336ec7 docs: Document repeat(exp) 2022-05-26 16:04:32 -05:00
Mattias Wadman f2ad9517c7 Mention -n in IO-section and for input/inputs 2022-05-26 16:02:50 -05:00
Zhaohui Mei 88116ba76d docs(manual): fix the typo errors in the manual 2022-05-26 15:47:02 -05:00
Mattias Wadman 3678822e7f docs: Fix some format inconsistencies in manual 2022-05-26 15:46:40 -05:00
Gijs Kunze 0171a9eb60 fixes incorrect example in man page 2022-05-26 15:45:52 -05:00
Mattias Wadman cc4efc49e1 Fix incorrect if empty string example 2021-05-01 14:33:01 -04:00
Aleksey Tsalolikhin 9600a5c781 Re-apply patch from ff8924ce16 to dev manual 2021-05-01 14:19:45 -04:00
Aleksey Tsalolikhin d57d9737d7 Remove decimal number text from v1.6 manual 2021-05-01 14:19:45 -04:00
Alexandre Jasmin 80052e5275 Fix #2197 extended regex pattern example 2020-12-18 00:01:19 -05:00
Maximilian Roos a17dd3248a Add some missing code quoting to the manual 2020-06-08 12:35:13 -04:00
Alanscut 5b9e63e4af fix typos 2020-01-14 10:18:22 -06:00
William Chargin baecf2ce9e docs: --indent value has maximum of 7, not 8
Test Plan:
To verify that this is in fact the behavior:

```
$ jq --indent 7 -n '[1]'
[
       1
]
$ jq --indent 8 -n '[1]'
jq: --indent takes a number between -1 and 7
Use jq --help for help with command-line options,
or see the jq manpage, or online docs  at https://stedolan.github.io/jq
```

This patch was generated by running `git grep "no more than"` and fixing
up appropriate results.

wchargin-branch: docs-fix-indent-bounds
2020-01-07 23:34:52 -06:00
Alanscut e7d37983c4 outputing -> outputting 2020-01-03 09:56:04 -06:00
David Biesack 07b18a33fe Update other manual and source to use ;37 2020-01-02 15:47:26 -06:00
David Biesack cf615152e1 correct the default JQ_COLORS to use 37, not undefined color 39 2020-01-02 15:47:26 -06:00
Alanscut fa3733cc4c fix typos 2020-01-02 10:52:12 -06:00
Paul Wise 24564b2d34 Add -0 / --nul-output option for processing values containing newlines
Closes: https://github.com/stedolan/jq/issues/1271
2019-12-30 15:37:14 -06:00
Felix Wolfsteller 707022b0e5 Rephrase doc "A string B is contained in A" ...
Minor rephrasing to prevent read/brain backtracking when using capital letter A as an article and a variable term.
2019-12-29 23:52:47 -06:00
Leonid S. Usov cf4b48c7ba Save literal value of the parsed number to preserve it for the output
Extend jv_number to use decNumber for storing number literals. Any math
operations on the numbers will truncate them to double precision.
Comparisons when both numbers are literal numbers will compare them
without truncation.

Delay conversion of numbers to doubles until a math operation is performed,
to preserve precision. A literal jv_number will only need conversion to
double once, and will reuse the resultant double on subsequent
conversions.

Outputting literal jv_numbers preserves the original precision.

Add strong pthread requirement to manage contexts/allocations for
converting numbers between their decNumber, string, and double formats.
2019-10-22 14:11:04 -04:00
Helmut K. C. Tessarek 8d9817d2f7 clarify filter usage
The current paragraph is not complete, since a digit is not a special character.

Changing it to:

    If the key contains special characters or starts with a digit,
    you need to surround it with double quotes like this:
    `."foo$"`, or else `.["foo$"]`.
2019-07-08 21:02:43 -04:00
Nicolas Williams 0dab2b18d7 Add -b / --binary option for Windows 2019-03-24 23:23:16 -05:00