export
for core
Export definitions or environment variables from a module.
Signature
> export {flags}
Input/output types:
input | output |
---|---|
nothing | nothing |
Examples
Export a definition from a module
> module utils { export def my-command [] { "hello" } }; use utils my-command; my-command
hello
Notes
This command is a parser keyword. For details, check: https://irsh.vercel.app/book/thinking_in_rsh.html
Subcommands:
name | type | usage |
---|---|---|
export alias
|
Builtin | Alias a command (with optional flags) to a new name and export it from a module. |
export const
|
Builtin | Use parse-time constant from a module and export them from this module. |
export def
|
Builtin | Define a custom command and export it from a module. |
export def-env
|
Builtin | Define a custom command that participates in the environment and export it from a module. |
export extern
|
Builtin | Define an extern and export it from a module. |
export extern-wrapped
|
Builtin | Define an extern with a custom code block and export it from a module. |
export module
|
Builtin | Export a custom module from a module. |
export use
|
Builtin | Use definitions from a module and export them from this module. |