nushell/tests/shell
Wind 1964dacaef
Raise error when using o>| pipe (#13323)
# Description
From the feedbacks from @amtoine , it's good to make nushell shows error
for `o>|` syntax.

# User-Facing Changes
## Before
```nushell
'foo' o>| print                                                                                                                                                                                                                     07/09/2024 06:44:23 AM
Error: nu::parser::parse_mismatch

  × Parse mismatch during operation.
   ╭─[entry #6:1:9]
 1 │ 'foo' o>| print
   ·         ┬
   ·         ╰── expected redirection target
```

## After
```nushell
'foo' o>| print                                                                                                                                                                                                                     07/09/2024 06:47:26 AM
Error: nu::parser::parse_mismatch

  × Parse mismatch during operation.
   ╭─[entry #1:1:7]
 1 │ 'foo' o>| print
   ·       ─┬─
   ·        ╰── expected `|`.  Redirection stdout to pipe is the same as piping directly.
   ╰────
```

# Tests + Formatting
Added one test

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2024-07-09 07:11:25 -05:00
..
environment Make which-support feature non-optional (#13125) 2024-06-12 20:04:12 -05:00
pipeline Raise error when using o>| pipe (#13323) 2024-07-09 07:11:25 -05:00
mod.rs Make which-support feature non-optional (#13125) 2024-06-12 20:04:12 -05:00
repl.rs Fix merging child stack into parent (#12426) 2024-04-06 15:03:22 +00:00