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

nu-check for strings

Validate and parse input content.

Signature

> nu-check {flags} (path)

Flags

  • --as-module, -m: Parse content as module
  • --debug, -d: Show error messages

Parameters

  • path: File path to parse.

Input/output types:

inputoutput
anybool
list<any>bool
nothingbool
stringbool

Examples

Parse a input file as script(Default)

> nu-check script.nu

Parse a input file as module

> nu-check --as-module module.nu

Parse a input file by showing error message

> nu-check --debug script.nu

Parse a byte stream as script by showing error message

> open foo.nu | nu-check --debug script.nu

Parse an internal stream as module by showing error message

> open module.nu | lines | nu-check --debug --as-module module.nu

Parse a string as script

> $'two(char nl)lines' | nu-check