nushell/crates/nu-command/tests
WindSoilder f043a8a8ff
redirect should have a target (#10835)
# Description
Fixes:  #10830 

The issue happened during lite-parsing, when we want to put a
`LiteElement` to a `LitePipeline`, we do nothing if relative redirection
target is empty.

So the command `echo aaa o> | ignore` will be interpreted to `echo aaa |
ignore`.

This pr is going to check and return an error if redirection target is
empty.

# User-Facing Changes
## Before
```
❯ echo aaa o> | ignore   # nothing happened
```

## After
```nushell
❯ echo aaa o> | ignore
Error: nu::parser::parse_mismatch

  × Parse mismatch during operation.
   ╭─[entry #1:1:1]
 1 │ echo aaa o> | ignore
   ·          ─┬
   ·           ╰── expected redirection target
   ╰────
```
2023-10-25 11:19:35 +02:00
..
commands redirect should have a target (#10835) 2023-10-25 11:19:35 +02:00
format_conversions fix: Ensure consistent vals and cols when parsing with --flexible (#10814) 2023-10-24 15:54:26 -05:00
main.rs Rename misused "deprecation" to removal (#10000) 2023-08-15 07:17:31 +12:00