Remove deprecated --argfile option
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by itchyny · committed by Nico Williams · parent bb8221e · Browse files · 3 files·+2 added−25 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+2 added−25 removed
- other:+2 added−25 removed
Provenance
- Commit
a29ac81- Tree
c309112- Author
itchyny <itchyny@cybozu.co.jp>- Committer
Nico Williams <nico@cryptonector.com>- Parent
bb8221e
3 files changed+2 added−25 removed
modified:docs/content/manual/manual.yml-8 removed
255 unmodified lines256 global variable. If you run jq with `--rawfile foo bar`, then `$foo` is257 available in the program and has a string whose contents are to the texts258 in the file named `bar`.259 260- * `--argfile variable-name filename`:261-262- Do not use. Use `--slurpfile` instead.263-264- (This option is like `--slurpfile`, but when the file has just265- one text, then that is used, else an array of texts is used as266- in `--slurpfile`.)267-260 * `--args`:261 262 Remaining arguments are positional string arguments. These are263 available to the jq program as `$ARGS.positional[]`.3361 unmodified linesmodified:src/main.c+2 added-8 removed
519 unmodified lines520 }521 i += 2; // skip the next two arguments522 continue;523 }524- if (isoption(argv[i], 0, "argfile", &short_opts) ||525- isoption(argv[i], 0, "rawfile", &short_opts) ||524+ if (isoption(argv[i], 0, "rawfile", &short_opts) ||525 isoption(argv[i], 0, "slurpfile", &short_opts)) {526 int raw = isoption(argv[i], 0, "rawfile", &short_opts);527 const char *which;529- if (isoption(argv[i], 0, "argfile", &short_opts))530- which = "argfile";531- else if (raw)528+ if (raw)529 which = "rawfile";530 else531 which = "slurpfile";532 if (i >= argc - 2) {9 unmodified lines542 jv_free(data);543 ret = JQ_ERROR_SYSTEM;544 goto out;545 }549- if (strcmp(which, "argfile") == 0 &&550- jv_get_kind(data) == JV_KIND_ARRAY && jv_array_length(jv_copy(data)) == 1)551- data = jv_array_get(data, 0);546 program_arguments = jv_object_set(program_arguments, jv_string(argv[i+1]), data);547 }548 i += 2; // skip the next two arguments549 continue;215 unmodified linesmodified:jq.1.prebuilt-9 removed
194 unmodified lines195 .IP196 This option reads in the named file and binds its contents to the given global variable\. If you run jq with \fB\-\-rawfile foo bar\fR, then \fB$foo\fR is available in the program and has a string whose contents are to the texts in the file named \fBbar\fR\.197 .198 .TP199-\fB\-\-argfile variable\-name filename\fR:200-.201-.IP202-Do not use\. Use \fB\-\-slurpfile\fR instead\.203-.204-.IP205-(This option is like \fB\-\-slurpfile\fR, but when the file has just one text, then that is used, else an array of texts is used as in \fB\-\-slurpfile\fR\.)206-.207-.TP199 \fB\-\-args\fR:200 .201 .IP202 Remaining arguments are positional string arguments\. These are available to the jq program as \fB$ARGS\.positional[]\fR\.3867 unmodified lines