Skip to content
Myr

Add --library-path long option for -L

Before adoption: this commit came in with the history the project adopted, so no landing records it.

-L is the only option without a long form.

authored by Thalia Archibald · committed by Emanuele Torre · parent ff4acba · Browse files · 3 files+6 added−6 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+6 added−6 removed

  • other:+6 added−6 removed

3 files+6 added−6 removed

modified:docs/content/manual/dev/manual.yml+1 added-1 removed
224 unmodified lines
225226 Read filter from the file rather than from a command line, like227 awk's -f option.228229 * `-L directory`:229 * `-L directory` / `--library-path directory`:230231 Prepend `directory` to the search list for modules. If this232 option is used then no builtin search list is used. See the233 section on modules below.
3589 unmodified lines
modified:src/main.c+3 added-3 removed
93 unmodified lines
94 " --stream-errors implies --stream and report parse error as\n"95 " an array;\n"96 " --seq parse input/output as application/json-seq;\n"97 " -f, --from-file file load filter from the file;\n"98 " -L directory search modules from the directory;\n"98 " -L, --library-path dir search modules from the directory;\n"99 " --arg name value set $name to the string value;\n"100 " --argjson name value set $name to the JSON value;\n"101 " --slurpfile name file set $name to an array of JSON values read\n"102 " from the file;\n"
33 unmodified lines
136 if (!**text) *text = NULL;137 return 1;138 }139 } else {140 if (longopt != NULL && !strcmp(*text, longopt)) {140 if (!strcmp(*text, longopt)) {141 *text = NULL;142 return 1;143 }144 }
257 unmodified lines
402 } else if (isoption(&text, 'n', "null-input", is_short)) {403 options |= PROVIDE_NULL;404 } else if (isoption(&text, 'f', "from-file", is_short)) {405 options |= FROM_FILE;406 } else if (isoption(&text, 'L', NULL, is_short)) {406 } else if (isoption(&text, 'L', "library-path", is_short)) {407 if (jv_get_kind(lib_search_paths) == JV_KIND_NULL)408 lib_search_paths = jv_array();409 if (text != NULL) { // -Lname410 lib_search_paths = jv_array_append(lib_search_paths, jq_realpath(jv_string(text)));
308 unmodified lines
modified:jq.1.prebuilt+2 added-2 removed
1.2.TH "JQ" "1" "September 2024" "" ""2.TH "JQ" "1" "October 2024" "" ""3.4.SH "NAME"5\fBjq\fR \- Command\-line JSON processor6.
161 unmodified lines
168.IP169Read filter from the file rather than from a command line, like awk\'s \-f option\.170.171.TP172\fB\-L directory\fR:172\fB\-L directory\fR / \fB\-\-library\-path directory\fR:173.174.IP175Prepend \fBdirectory\fR to the search list for modules\. If this option is used then no builtin search list is used\. See the section on modules below\.176.
4087 unmodified lines