Skip to content

Commit cd9b542

Browse files
authored
Make stderr usage clearer (#1953)
1 parent 92ea6fa commit cd9b542

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

book/stdout_stderr_exit_codes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ Without the pipeline, Nushell will not do any redirection, allowing it to print
2020

2121
Another common stream that external applications often use to print error messages is stderr. By default, Nushell does not do any redirection of stderr, which means that by default it will print to the screen.
2222

23+
But you can do pass stderr to a command or a file if you want to:
24+
25+
- use `e>|` to pass stderr to next command.
26+
- use `e> file` to redirect stderr to a file.
27+
- use `do -i { cmd } | complete` to capture stderr message.
28+
2329
## Exit Code
2430

2531
Finally, external commands have an "exit code". These codes help give a hint to the caller whether the command ran successfully.

0 commit comments

Comments
 (0)