run for core
Runs a script file in an isolated scope as part of a pipeline.
Signature
> run {flags} (filename) ...rest
Flags
--full-reparse, -f: Reload and reparse the script on every invocation instead of using parser-cached blocks.
Parameters
filename: The filepath to the script file to run (nullfor no-op)....rest: Arguments to pass to the script'sdef mainif it exists.
Input/output types:
| input | output |
|---|---|
| any | any |
Examples
Run a simple transformation script in a pipeline.
> "hello" | run transform.nuRun a script with arguments.
> "test" | run format.nu --prefix ">>>"Run a script as part of a larger pipeline.
> ls | run process.nu | select name sizeAlways reload and reparse a script before each invocation.
> watch . -g *.nu | each -f { run --full-reparse ./test.nu }Notes
This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html