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

ignore for core

Ignore selected output streams from the previous command in the pipeline.

Signature

> ignore {flags}

Flags

  • --stderr, -e: Consume all stderr output and allow stdout output through.
  • --stdout, -o: Consume all stdout output and allow stderr output through.
  • --show-errors, -x: Allow errors through and set $env.LAST_EXIT_CODE (internal failures use 1).

Input/output types:

inputoutput
anyany

Examples

Ignore all stdout output (default behavior).

> echo done | ignore

Consume stderr and allow stdout through.

> echo done | ignore --stderr
done

Consume stdout while keeping stderr visible.

> $'done' | ignore --stdout

Show internal errors and read the resulting exit code.

> try { error make {msg: 'boom'} | ignore --show-errors } catch { $env.LAST_EXIT_CODE }
1