Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

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 (null for no-op).
  • ...rest: Arguments to pass to the script's def main if it exists.

Input/output types:

inputoutput
anyany

Examples

Run a simple transformation script in a pipeline.

> "hello" | run transform.nu

Run a script with arguments.

> "test" | run format.nu --prefix ">>>"

Run a script as part of a larger pipeline.

> ls | run process.nu | select name size

Always 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