mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Allow passing the inline jq script before --
jq previously only allowed passing the inline script before -- (as if they were options) even though one would expect the inline script to be a positional argument. Since jq previously also refused to run with a usage error if the script was passed after -- (It was not assuming . as script as it does when no arguments are passed), and positional arguments are allowed before -- and even before other options, it should not be a breaking change to change that weird behaviour, and allow the script to appear after --. It also simplifies the option parsing code a bunch. Fixes #2918
This commit is contained in:
committed by
Nico Williams
parent
7f547827e4
commit
4ebd21e1eb
2
jq.1.prebuilt
generated
2
jq.1.prebuilt
generated
@ -250,7 +250,7 @@ Output the jq help and exit with zero\.
|
||||
\fB\-\-\fR:
|
||||
.
|
||||
.IP
|
||||
Terminates argument processing\. Remaining arguments are positional, either strings, JSON texts, or input filenames, according to whether \fB\-\-args\fR or \fB\-\-jsonargs\fR were given\.
|
||||
Terminates argument processing\. Remaining arguments are not interpreted as options\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-run\-tests [filename]\fR:
|
||||
|
Reference in New Issue
Block a user