mirror of
https://github.com/danbulant/nushell
synced 2026-05-19 12:29:03 +00:00
614 B
614 B
| title | layout | version |
|---|---|---|
| source | command | 0.59.1 |
Runs a script file in the current context.
Signature
> source (filename)
Parameters
filename: the filepath to the script file to source
Examples
Runs foo.nu in the current context
> source foo.nu
Runs foo.nu in current context and call the command defined, suppose foo.nu has content: def say-hi [] { echo 'Hi!' }
> source ./foo.nu; say-hi
Runs foo.nu in current context and call the main command automatically, suppose foo.nu has content: def main [] { echo 'Hi!' }
> source ./foo.nu