Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update manual.yml #1989

Merged
merged 2 commits into from
Jun 13, 2023
Merged

Update manual.yml #1989

merged 2 commits into from
Jun 13, 2023

Conversation

ohhorob
Copy link
Contributor

@ohhorob ohhorob commented Oct 12, 2019

Add details about how to terminate argument processing.

A documentation update like this might help others that want to safely use positional arguments (#1986)

Add a note about how to provide positional arguments without confusing the arg parser.
@nicowilliams
Copy link
Contributor

I would prefer this fix:

diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml
index ac977c3..ca31924 100644
--- a/docs/content/manual/manual.yml
+++ b/docs/content/manual/manual.yml
@@ -272,6 +272,12 @@ sections:
         Remaining arguments are positional JSON text arguments.  These
         are available to the jq program as `$ARGS.positional[]`.

+      * `--`:
+
+        Terminates argument processing.  Remaining arguments are
+        positional, either strings, JSON texts, or input filenames,
+        according to whether `--args` or `--jsonargs` were given.
+
       * `--run-tests [filename]`:

         Runs the tests in the given file or standard input.  This must

Would that work for you?

@ohhorob
Copy link
Contributor Author

ohhorob commented Feb 4, 2023

@vergenzt if you can reach a developer with write access they can merge this PR.

@vergenzt
Copy link

vergenzt commented Feb 4, 2023

@ohhorob I personally sortof prefer @nicowilliams' explanation from #1989 (comment). Could you update this PR to use that suggestion?

@ohhorob
Copy link
Contributor Author

ohhorob commented Feb 5, 2023

Sure. I've changed this PR to use that suggestion.

Copy link
Contributor

@itchyny itchyny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@itchyny itchyny merged commit 9cb69ad into jqlang:master Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants