Skip to content

Commit

Permalink
Remove outdated FIXME
Browse files Browse the repository at this point in the history
This comment predates the addition of $ARGS in jq 1.6, so there was no
way to access named arguments with an invalid identifier. Rather than
forbid such names, update the manual to clarify.
  • Loading branch information
thaliaarchi committed Nov 2, 2024
1 parent 0677554 commit b276a86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/content/manual/dev/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ sections:
bind `$foo` to `"123"`.
Named arguments are also available to the jq program as
`$ARGS.named`.
`$ARGS.named`. When the name is not a valid identifier, this is
the only way to access it.
* `--argjson name JSON-text`:
Expand Down
4 changes: 2 additions & 2 deletions jq.1.prebuilt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ int main(int argc, char* argv[]) {
further_args_are_strings = 0;
further_args_are_json = 1;
} else if (isoption(&text, 0, "arg", is_short)) {
// FIXME: For --arg* we should check that the varname is acceptable
if (i >= argc - 2) {
fprintf(stderr, "%s: --arg takes two parameters (e.g. --arg varname value)\n", progname);
die();
Expand Down

0 comments on commit b276a86

Please sign in to comment.