ignore
For core.
Ignore selected output streams from the previous command in the pipeline.
Command Type
built-in
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:
| input | output |
|---|---|
| any | any |
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
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.