mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Fix misspellings (#2609)
This commit is contained in:
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: MacOS Build
|
||||
name: macOS Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
|
4
COPYING
4
COPYING
@ -27,7 +27,7 @@ license, which can be found at:
|
||||
|
||||
https://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
The documentation website includes a copy of Twitter's Boostrap and
|
||||
The documentation website includes a copy of Twitter's Bootstrap and
|
||||
relies on Bonsai, Liquid templates and various other projects, look
|
||||
them up for detailed licensing conditions.
|
||||
|
||||
@ -70,7 +70,7 @@ OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
|
||||
jq uses parts of the open source C library "decNumber", which is distribured
|
||||
jq uses parts of the open source C library "decNumber", which is distributed
|
||||
under the following license:
|
||||
|
||||
|
||||
|
@ -372,7 +372,7 @@
|
||||
|
||||
Add BLOCK_8() macro
|
||||
|
||||
Fix `foreach` non-progation of errors
|
||||
Fix `foreach` non-propagation of errors
|
||||
|
||||
Allow zero-length buffers in jv_parser_set_buf()
|
||||
|
||||
@ -1183,7 +1183,7 @@
|
||||
|
||||
Fix various UTF8 parsing bugs.
|
||||
In particular, parse bad UTF8 by replacing the broken bits with U+FFFD
|
||||
and resychronise correctly after broken sequences.
|
||||
and resynchronise correctly after broken sequences.
|
||||
|
||||
Fix example in manual for `floor`. See #155.
|
||||
|
||||
|
@ -215,7 +215,7 @@ EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \
|
||||
tests/base64.test tests/base64test \
|
||||
tests/jq-f-test.sh tests/shtest
|
||||
|
||||
# README.md is expected in Github projects, good stuff in it, so we'll
|
||||
# README.md is expected in GitHub projects, good stuff in it, so we'll
|
||||
# distribute it and install it with the package in the doc directory.
|
||||
docdir = ${datadir}/doc/${PACKAGE}
|
||||
dist_doc_DATA = README.md COPYING AUTHORS README
|
||||
|
2
NEWS
2
NEWS
@ -106,7 +106,7 @@ New features in 1.4 since 1.3:
|
||||
|
||||
- math functions
|
||||
|
||||
- floor, sqrt, cbrt, etetera (depends on what's available from libm)
|
||||
- floor, sqrt, cbrt, etcetera (depends on what's available from libm)
|
||||
|
||||
- libjq -- a C API interface to jq's JSON representation and for
|
||||
running jq programs from C applications
|
||||
|
@ -4,7 +4,7 @@ jq
|
||||
jq is a lightweight and flexible command-line JSON processor.
|
||||
|
||||
[](https://github.com/jqlang/jq/actions/workflows/linux.yml?query=branch%3Amaster)
|
||||
[](https://github.com/jqlang/jq/actions/workflows/macos.yml?query=branch%3Amaster)
|
||||
[](https://github.com/jqlang/jq/actions/workflows/macos.yml?query=branch%3Amaster)
|
||||
[](https://github.com/jqlang/jq/actions/workflows/windows.yml?query=branch%3Amaster)
|
||||
|
||||
If you want to learn to use jq, read the documentation at
|
||||
|
@ -51,7 +51,7 @@ cwd="$(realpath ${PWD} 2>/dev/null || echo ${PWD})"
|
||||
t_exit() {
|
||||
cat << EOF
|
||||
|
||||
A error as occured.
|
||||
A error as occurred.
|
||||
oniguruma location: ${builddir}/onig/onig-${oniguruma}
|
||||
jq location: ${cwd}
|
||||
|
||||
|
@ -243,7 +243,7 @@ AC_C_BIGENDIAN(
|
||||
AC_DEFINE([IEEE_MC68k], 1, [machine is bigendian]),
|
||||
AC_DEFINE([IEEE_8087], 1, [machine is littleendian]),
|
||||
AC_MSG_ERROR(unknown endianness),
|
||||
AC_MSG_ERROR(universial endianness not supported)
|
||||
AC_MSG_ERROR(universal endianness not supported)
|
||||
)
|
||||
|
||||
dnl Oniguruma
|
||||
|
@ -312,7 +312,7 @@ sections:
|
||||
|
||||
jq doesn't truncate the literal numbers to double unless there
|
||||
is a need to make arithmetic operations with the number.
|
||||
Comparisions are carried out over the untruncated big decimal
|
||||
Comparisons are carried out over the untruncated big decimal
|
||||
representation of the number.
|
||||
|
||||
jq will also try to maintain the original decimal precision of the provided
|
||||
@ -2006,7 +2006,7 @@ sections:
|
||||
|
||||
The `gmtime` builtin consumes a number of seconds since the
|
||||
Unix epoch and outputs a "broken down time" representation of
|
||||
Greenwhich Meridian time as an array of numbers representing
|
||||
Greenwich Mean Time as an array of numbers representing
|
||||
(in this order): the year, the month (zero-based), the day of
|
||||
the month (one-based), the hour of the day, the minute of the
|
||||
hour, the second of the minute, the day of the week, and the
|
||||
@ -2105,8 +2105,8 @@ sections:
|
||||
The expression 'a == b' will produce 'true' if the result of a and b
|
||||
are equal (that is, if they represent equivalent JSON documents) and
|
||||
'false' otherwise. In particular, strings are never considered equal
|
||||
to numbers. If you're coming from Javascript, jq's == is like
|
||||
Javascript's === - considering values equal only when they have the
|
||||
to numbers. If you're coming from JavaScript, jq's == is like
|
||||
JavaScript's === - considering values equal only when they have the
|
||||
same type as well as the same value.
|
||||
|
||||
!= is "not equal", and 'a != b' returns the opposite value of 'a == b'
|
||||
@ -2128,7 +2128,7 @@ sections:
|
||||
same as `.`.
|
||||
|
||||
Checking for false or null is a simpler notion of
|
||||
"truthiness" than is found in Javascript or Python, but it
|
||||
"truthiness" than is found in JavaScript or Python, but it
|
||||
means that you'll sometimes have to be more explicit about
|
||||
the condition you want. You can't test whether, e.g. a
|
||||
string is empty using `if .name then A else B end`, you'll
|
||||
@ -3078,7 +3078,7 @@ sections:
|
||||
and you append something to `.foo`, then `.bar` will not get
|
||||
bigger, even if you've previously set `.bar = .foo`. If you're
|
||||
used to programming in languages like Python, Java, Ruby,
|
||||
Javascript, etc. then you can think of it as though jq does a full
|
||||
JavaScript, etc. then you can think of it as though jq does a full
|
||||
deep copy of every object before it does the assignment (for
|
||||
performance it doesn't actually do that, but that's the general
|
||||
idea).
|
||||
|
@ -888,8 +888,8 @@ sections:
|
||||
The expression 'a == b' will produce 'true' if the result of a and b
|
||||
are equal (that is, if they represent equivalent JSON documents) and
|
||||
'false' otherwise. In particular, strings are never considered equal
|
||||
to numbers. If you're coming from Javascript, jq's == is like
|
||||
Javascript's === - considering values equal only when they have the
|
||||
to numbers. If you're coming from JavaScript, jq's == is like
|
||||
JavaScript's === - considering values equal only when they have the
|
||||
same type as well as the same value.
|
||||
|
||||
!= is "not equal", and 'a != b' returns the opposite value of 'a == b'
|
||||
@ -906,7 +906,7 @@ sections:
|
||||
as `C` otherwise.
|
||||
|
||||
Checking for false or null is a simpler notion of
|
||||
"truthiness" than is found in Javascript or Python, but it
|
||||
"truthiness" than is found in JavaScript or Python, but it
|
||||
means that you'll sometimes have to be more explicit about
|
||||
the condition you want: you can't test whether, e.g. a
|
||||
string is empty using `if .name then A else B end`, you'll
|
||||
@ -1169,7 +1169,7 @@ sections:
|
||||
If an object has two fields which are arrays, `.foo` and `.bar`,
|
||||
and you append something to `.foo`, then `.bar` will not get
|
||||
bigger. Even if you've just set `.bar = .foo`. If you're used to
|
||||
programming in languages like Python, Java, Ruby, Javascript,
|
||||
programming in languages like Python, Java, Ruby, JavaScript,
|
||||
etc. then you can think of it as though jq does a full deep copy
|
||||
of every object before it does the assignment (for performance,
|
||||
it doesn't actually do that, but that's the general idea).
|
||||
@ -1186,7 +1186,7 @@ sections:
|
||||
.foo = .bar | .foo.baz = 1
|
||||
|
||||
will not have the side-effect of setting .bar.baz to be set
|
||||
to 1, as the similar-looking program in Javascript, Python,
|
||||
to 1, as the similar-looking program in JavaScript, Python,
|
||||
Ruby or other languages would. Unlike these languages (but
|
||||
like Haskell and some other functional languages), there is
|
||||
no notion of two arrays or objects being "the same array" or
|
||||
|
@ -957,7 +957,7 @@ sections:
|
||||
|
||||
The `unique_by(.foo)` function takes as input an array and produces
|
||||
an array of the same elements, in sorted order, with
|
||||
elqements with a duplicate `.foo` field removed. Think of it as making
|
||||
elements with a duplicate `.foo` field removed. Think of it as making
|
||||
an array by taking one element out of every group produced by
|
||||
`group_by`.
|
||||
|
||||
@ -1290,8 +1290,8 @@ sections:
|
||||
The expression 'a == b' will produce 'true' if the result of a and b
|
||||
are equal (that is, if they represent equivalent JSON documents) and
|
||||
'false' otherwise. In particular, strings are never considered equal
|
||||
to numbers. If you're coming from Javascript, jq's == is like
|
||||
Javascript's === - considering values equal only when they have the
|
||||
to numbers. If you're coming from JavaScript, jq's == is like
|
||||
JavaScript's === - considering values equal only when they have the
|
||||
same type as well as the same value.
|
||||
|
||||
!= is "not equal", and 'a != b' returns the opposite value of 'a == b'
|
||||
@ -1308,7 +1308,7 @@ sections:
|
||||
as `C` otherwise.
|
||||
|
||||
Checking for false or null is a simpler notion of
|
||||
"truthiness" than is found in Javascript or Python, but it
|
||||
"truthiness" than is found in JavaScript or Python, but it
|
||||
means that you'll sometimes have to be more explicit about
|
||||
the condition you want: you can't test whether, e.g. a
|
||||
string is empty using `if .name then A else B end`, you'll
|
||||
@ -1571,7 +1571,7 @@ sections:
|
||||
If an object has two fields which are arrays, `.foo` and `.bar`,
|
||||
and you append something to `.foo`, then `.bar` will not get
|
||||
bigger. Even if you've just set `.bar = .foo`. If you're used to
|
||||
programming in languages like Python, Java, Ruby, Javascript,
|
||||
programming in languages like Python, Java, Ruby, JavaScript,
|
||||
etc. then you can think of it as though jq does a full deep copy
|
||||
of every object before it does the assignment (for performance,
|
||||
it doesn't actually do that, but that's the general idea).
|
||||
@ -1588,7 +1588,7 @@ sections:
|
||||
.foo = .bar | .foo.baz = 1
|
||||
|
||||
will not have the side-effect of setting .bar.baz to be set
|
||||
to 1, as the similar-looking program in Javascript, Python,
|
||||
to 1, as the similar-looking program in JavaScript, Python,
|
||||
Ruby or other languages would. Unlike these languages (but
|
||||
like Haskell and some other functional languages), there is
|
||||
no notion of two arrays or objects being "the same array" or
|
||||
|
@ -1768,8 +1768,8 @@ sections:
|
||||
The expression 'a == b' will produce 'true' if the result of a and b
|
||||
are equal (that is, if they represent equivalent JSON documents) and
|
||||
'false' otherwise. In particular, strings are never considered equal
|
||||
to numbers. If you're coming from Javascript, jq's == is like
|
||||
Javascript's === - considering values equal only when they have the
|
||||
to numbers. If you're coming from JavaScript, jq's == is like
|
||||
JavaScript's === - considering values equal only when they have the
|
||||
same type as well as the same value.
|
||||
|
||||
!= is "not equal", and 'a != b' returns the opposite value of 'a == b'
|
||||
@ -1787,7 +1787,7 @@ sections:
|
||||
as `C` otherwise.
|
||||
|
||||
Checking for false or null is a simpler notion of
|
||||
"truthiness" than is found in Javascript or Python, but it
|
||||
"truthiness" than is found in JavaScript or Python, but it
|
||||
means that you'll sometimes have to be more explicit about
|
||||
the condition you want: you can't test whether, e.g. a
|
||||
string is empty using `if .name then A else B end`, you'll
|
||||
@ -2620,7 +2620,7 @@ sections:
|
||||
If an object has two fields which are arrays, `.foo` and `.bar`,
|
||||
and you append something to `.foo`, then `.bar` will not get
|
||||
bigger. Even if you've just set `.bar = .foo`. If you're used to
|
||||
programming in languages like Python, Java, Ruby, Javascript,
|
||||
programming in languages like Python, Java, Ruby, JavaScript,
|
||||
etc. then you can think of it as though jq does a full deep copy
|
||||
of every object before it does the assignment (for performance,
|
||||
it doesn't actually do that, but that's the general idea).
|
||||
@ -2640,7 +2640,7 @@ sections:
|
||||
.foo = .bar | .foo.baz = 1
|
||||
|
||||
will not have the side-effect of setting .bar.baz to be set
|
||||
to 1, as the similar-looking program in Javascript, Python,
|
||||
to 1, as the similar-looking program in JavaScript, Python,
|
||||
Ruby or other languages would. Unlike these languages (but
|
||||
like Haskell and some other functional languages), there is
|
||||
no notion of two arrays or objects being "the same array" or
|
||||
|
@ -1915,7 +1915,7 @@ sections:
|
||||
|
||||
The `gmtime` builtin consumes a number of seconds since the
|
||||
Unix epoch and outputs a "broken down time" representation of
|
||||
Greenwhich Meridian time as an array of numbers representing
|
||||
Greenwich Mean Time as an array of numbers representing
|
||||
(in this order): the year, the month (zero-based), the day of
|
||||
the month (one-based), the hour of the day, the minute of the
|
||||
hour, the second of the minute, the day of the week, and the
|
||||
@ -2014,8 +2014,8 @@ sections:
|
||||
The expression 'a == b' will produce 'true' if the result of a and b
|
||||
are equal (that is, if they represent equivalent JSON documents) and
|
||||
'false' otherwise. In particular, strings are never considered equal
|
||||
to numbers. If you're coming from Javascript, jq's == is like
|
||||
Javascript's === - considering values equal only when they have the
|
||||
to numbers. If you're coming from JavaScript, jq's == is like
|
||||
JavaScript's === - considering values equal only when they have the
|
||||
same type as well as the same value.
|
||||
|
||||
!= is "not equal", and 'a != b' returns the opposite value of 'a == b'
|
||||
@ -2033,7 +2033,7 @@ sections:
|
||||
as `C` otherwise.
|
||||
|
||||
Checking for false or null is a simpler notion of
|
||||
"truthiness" than is found in Javascript or Python, but it
|
||||
"truthiness" than is found in JavaScript or Python, but it
|
||||
means that you'll sometimes have to be more explicit about
|
||||
the condition you want: you can't test whether, e.g. a
|
||||
string is empty using `if .name then A else B end`, you'll
|
||||
@ -2972,7 +2972,7 @@ sections:
|
||||
and you append something to `.foo`, then `.bar` will not get
|
||||
bigger, even if you've previously set `.bar = .foo`. If you're
|
||||
used to programming in languages like Python, Java, Ruby,
|
||||
Javascript, etc. then you can think of it as though jq does a full
|
||||
JavaScript, etc. then you can think of it as though jq does a full
|
||||
deep copy of every object before it does the assignment (for
|
||||
performance it doesn't actually do that, but that's the general
|
||||
idea).
|
||||
|
@ -238,7 +238,7 @@ Since jq by default pretty\-prints all output, this trivial program can be a use
|
||||
An important point about the identity filter is that it guarantees to preserve the literal decimal representation of values\. This is particularly important when dealing with numbers which can\'t be losslessly converted to an IEEE754 double precision representation\.
|
||||
.
|
||||
.P
|
||||
jq doesn\'t truncate the literal numbers to double unless there is a need to make arithmetic operations with the number\. Comparisions are carried out over the untruncated big decimal representation of the number\.
|
||||
jq doesn\'t truncate the literal numbers to double unless there is a need to make arithmetic operations with the number\. Comparisons are carried out over the untruncated big decimal representation of the number\.
|
||||
.
|
||||
.P
|
||||
jq will also try to maintain the original decimal precision of the provided number literal\. See below for examples\.
|
||||
@ -2180,7 +2180,7 @@ The \fBnow\fR builtin outputs the current time, in seconds since the Unix epoch\
|
||||
Low\-level jq interfaces to the C\-library time functions are also provided: \fBstrptime\fR, \fBstrftime\fR, \fBstrflocaltime\fR, \fBmktime\fR, \fBgmtime\fR, and \fBlocaltime\fR\. Refer to your host operating system\'s documentation for the format strings used by \fBstrptime\fR and \fBstrftime\fR\. Note: these are not necessarily stable interfaces in jq, particularly as to their localization functionality\.
|
||||
.
|
||||
.P
|
||||
The \fBgmtime\fR builtin consumes a number of seconds since the Unix epoch and outputs a "broken down time" representation of Greenwhich Meridian time as an array of numbers representing (in this order): the year, the month (zero\-based), the day of the month (one\-based), the hour of the day, the minute of the hour, the second of the minute, the day of the week, and the day of the year \-\- all one\-based unless otherwise stated\. The day of the week number may be wrong on some systems for dates before March 1st 1900, or after December 31 2099\.
|
||||
The \fBgmtime\fR builtin consumes a number of seconds since the Unix epoch and outputs a "broken down time" representation of Greenwich Mean Time as an array of numbers representing (in this order): the year, the month (zero\-based), the day of the month (one\-based), the hour of the day, the minute of the hour, the second of the minute, the day of the week, and the day of the year \-\- all one\-based unless otherwise stated\. The day of the week number may be wrong on some systems for dates before March 1st 1900, or after December 31 2099\.
|
||||
.
|
||||
.P
|
||||
The \fBlocaltime\fR builtin works like the \fBgmtime\fR builtin, but using the local timezone setting\.
|
||||
@ -2265,7 +2265,7 @@ Returns a list of all builtin functions in the format \fBname/arity\fR\. Since f
|
||||
.SH "CONDITIONALS AND COMPARISONS"
|
||||
.
|
||||
.SS "==, !="
|
||||
The expression \'a == b\' will produce \'true\' if the result of a and b are equal (that is, if they represent equivalent JSON documents) and \'false\' otherwise\. In particular, strings are never considered equal to numbers\. If you\'re coming from Javascript, jq\'s == is like Javascript\'s === \- considering values equal only when they have the same type as well as the same value\.
|
||||
The expression \'a == b\' will produce \'true\' if the result of a and b are equal (that is, if they represent equivalent JSON documents) and \'false\' otherwise\. In particular, strings are never considered equal to numbers\. If you\'re coming from JavaScript, jq\'s == is like JavaScript\'s === \- considering values equal only when they have the same type as well as the same value\.
|
||||
.
|
||||
.P
|
||||
!= is "not equal", and \'a != b\' returns the opposite value of \'a == b\'
|
||||
@ -2289,7 +2289,7 @@ jq \'\.[] == 1\'
|
||||
\fBif A then B end\fR is the same as \fBif A then B else \. end\fR\. That is, the \fBelse\fR branch is optional, and if absent is the same as \fB\.\fR\.
|
||||
.
|
||||
.P
|
||||
Checking for false or null is a simpler notion of "truthiness" than is found in Javascript or Python, but it means that you\'ll sometimes have to be more explicit about the condition you want\. You can\'t test whether, e\.g\. a string is empty using \fBif \.name then A else B end\fR, you\'ll need something more like \fBif \.name == "" then A else B end\fR instead\.
|
||||
Checking for false or null is a simpler notion of "truthiness" than is found in JavaScript or Python, but it means that you\'ll sometimes have to be more explicit about the condition you want\. You can\'t test whether, e\.g\. a string is empty using \fBif \.name then A else B end\fR, you\'ll need something more like \fBif \.name == "" then A else B end\fR instead\.
|
||||
.
|
||||
.P
|
||||
If the condition \fBA\fR produces multiple results, then \fBB\fR is evaluated once for each result that is not false or null, and \fBC\fR is evaluated once for each false or null\.
|
||||
@ -3324,7 +3324,7 @@ jq \'\. as $dot|fromstream($dot|tostream)|\.==$dot\'
|
||||
Assignment works a little differently in jq than in most programming languages\. jq doesn\'t distinguish between references to and copies of something \- two objects or arrays are either equal or not equal, without any further notion of being "the same object" or "not the same object"\.
|
||||
.
|
||||
.P
|
||||
If an object has two fields which are arrays, \fB\.foo\fR and \fB\.bar\fR, and you append something to \fB\.foo\fR, then \fB\.bar\fR will not get bigger, even if you\'ve previously set \fB\.bar = \.foo\fR\. If you\'re used to programming in languages like Python, Java, Ruby, Javascript, etc\. then you can think of it as though jq does a full deep copy of every object before it does the assignment (for performance it doesn\'t actually do that, but that\'s the general idea)\.
|
||||
If an object has two fields which are arrays, \fB\.foo\fR and \fB\.bar\fR, and you append something to \fB\.foo\fR, then \fB\.bar\fR will not get bigger, even if you\'ve previously set \fB\.bar = \.foo\fR\. If you\'re used to programming in languages like Python, Java, Ruby, JavaScript, etc\. then you can think of it as though jq does a full deep copy of every object before it does the assignment (for performance it doesn\'t actually do that, but that\'s the general idea)\.
|
||||
.
|
||||
.P
|
||||
This means that it\'s impossible to build circular values in jq (such as an array whose first element is itself)\. This is quite intentional, and ensures that anything a jq program can produce can be represented in JSON\.
|
||||
|
@ -235,7 +235,7 @@ if [ $(HOME="$mods/home1" $VALGRIND $Q $JQ --debug-dump-disasm -n fg | grep '^[a
|
||||
fi
|
||||
|
||||
if ! HOME="$mods/home2" $VALGRIND $Q $JQ -n 'include "g"; empty'; then
|
||||
echo "Mishanding directory ~/.jq" 1>&2
|
||||
echo "Mishandling directory ~/.jq" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user