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:
1 parent
7f547827e4
commit
4ebd21e1eb
4 files changed
+17
-25
No files matched your search
Generated
+1
-1
@@ -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