Simplify import docs
This commit is contained in:
1 parent
862566a48f
commit
fa45a5121c
1 file changed
+27
-36
@@ -2777,6 +2777,7 @@ sections:
|
|||||||
If "$HOME/.jq" is a file, it is sourced into the main program.
|
If "$HOME/.jq" is a file, it is sourced into the main program.
|
||||||
|
|
||||||
entries:
|
entries:
|
||||||
|
- title: "`import RelativePathString as NAME [<metadata>];`"
|
||||||
body: |
|
body: |
|
||||||
|
|
||||||
Imports a module found at the given path relative to a
|
Imports a module found at the given path relative to a
|
||||||
@@ -2784,34 +2785,32 @@ sections:
|
|||||||
the relative path string. The module's symbols are prefixed
|
the relative path string. The module's symbols are prefixed
|
||||||
with "NAME::".
|
with "NAME::".
|
||||||
|
|
||||||
- title: "`import RelativePathString;`"
|
The optional metadata must be a constant jq expression. It
|
||||||
body: |
|
should be an object with keys like "homepage" and so on. At
|
||||||
|
this time jq only uses the "search" key/value of the metadata.
|
||||||
Imports a module found at the given path relative to a
|
The metadata is also made available to users via the
|
||||||
directory in a search path. A ".jq" suffix will be added to
|
`modulemeta` builtin.
|
||||||
the relative path string. The module's symbols are imported
|
|
||||||
into the caller's namespace as if the module's content had
|
|
||||||
been included directly.
|
|
||||||
|
|
||||||
- title: "`import RelativePathString as NAME <metadata>;`"
|
|
||||||
body: |
|
|
||||||
|
|
||||||
Imports a module found at the given path relative to a
|
|
||||||
directory in a search path. A ".jq" suffix will be added to
|
|
||||||
the relative path string. The module's symbols are prefixed
|
|
||||||
with "NAME::".
|
|
||||||
|
|
||||||
The metadata must be a constant jq expression. It should be
|
|
||||||
an object with keys like "homepage" and so on. At this time
|
|
||||||
jq only uses the "search" key/value of the metadata. The
|
|
||||||
metadata is also made available to users via the `modulemeta`
|
|
||||||
builtin.
|
|
||||||
|
|
||||||
The "search" key in the metadata, if present, should have a
|
The "search" key in the metadata, if present, should have a
|
||||||
string or array value (array of strings); this is the search
|
string or array value (array of strings); this is the search
|
||||||
path to be prefixed to the top-level search path.
|
path to be prefixed to the top-level search path.
|
||||||
|
|
||||||
- title: "`import RelativePathString as $NAME;`"
|
- title: "`import RelativePathString [<metadata>];`"
|
||||||
|
body: |
|
||||||
|
|
||||||
|
Imports a module found at the given path relative to a
|
||||||
|
directory in a search path as if it were included in place. A
|
||||||
|
".jq" suffix will be added to the relative path string. The
|
||||||
|
module's symbols are imported into the caller's namespace as
|
||||||
|
if the module's content had been included directly.
|
||||||
|
|
||||||
|
The optional metadata must be a constant jq expression. It
|
||||||
|
should be an object with keys like "homepage" and so on. At
|
||||||
|
this time jq only uses the "search" key/value of the metadata.
|
||||||
|
The metadata is also made available to users via the
|
||||||
|
`modulemeta` builtin.
|
||||||
|
|
||||||
|
- title: "`import RelativePathString as $NAME [<metadata>];`"
|
||||||
body: |
|
body: |
|
||||||
|
|
||||||
Imports a JSON file found at the given path relative to a
|
Imports a JSON file found at the given path relative to a
|
||||||
@@ -2819,19 +2818,11 @@ sections:
|
|||||||
the relative path string. The file's data will be available
|
the relative path string. The file's data will be available
|
||||||
as `$NAME::NAME`.
|
as `$NAME::NAME`.
|
||||||
|
|
||||||
- title: "`import RelativePathString as $NAME <metadata>;`"
|
The optional metadata must be a constant jq expression. It
|
||||||
body: |
|
should be an object with keys like "homepage" and so on. At
|
||||||
|
this time jq only uses the "search" key/value of the metadata.
|
||||||
Imports a JSON file found at the given path relative to a
|
The metadata is also made available to users via the
|
||||||
directory in a search path. A ".json" suffix will be added to
|
`modulemeta` builtin.
|
||||||
the relative path string. The file's data will be available
|
|
||||||
as `$NAME::NAME`.
|
|
||||||
|
|
||||||
The metadata must be a constant jq expression. It should be
|
|
||||||
an object with keys like "homepage" and so on. At this time
|
|
||||||
jq only uses the "search" key/value of the metadata. The
|
|
||||||
metadata is also made available to users via the `modulemeta`
|
|
||||||
builtin.
|
|
||||||
|
|
||||||
The "search" key in the metadata, if present, should have a
|
The "search" key in the metadata, if present, should have a
|
||||||
string or array value (array of strings); this is the search
|
string or array value (array of strings); this is the search
|
||||||
|
|||||||
Reference in new issue
Block a user