nushell/crates/nu-protocol/src/ast
WindSoilder 077d1c8125
Support o>>, e>>, o+e>> to append output to an external file (#10764)
# Description
Close: #10278

This pr introduces `o>>`, `e>>`, `o+e>>` to allow redirection to append
to a file.
Examples:
```nushell
echo abc o>> a.txt
echo abc o>> a.txt
cat asdf e>> a.txt
cat asdf e>> a.txt
cat asdf o+e>> a.txt
```

~~TODO:~~
~~1. currently internal commands with `o+e>` redirect to a variable is
broken: `let x = "a.txt"; echo abc o+e> $x`, not sure when it was
introduced...~~
~~2. redirect stdout and stderr with append mode doesn't supported yet:
`cat asdf o>>a.txt e>>b.ext`~~

~~For these 2 items, I'd like to fix them in different prs.~~
Already done in this pr
2023-11-27 07:52:39 -06:00
..
block.rs Support o>>, e>>, o+e>> to append output to an external file (#10764) 2023-11-27 07:52:39 -06:00
call.rs Add Argument::span() and Call::arguments_span() (#10983) 2023-11-19 21:43:56 +01:00
cell_path.rs Implement Display for CellPath (#11023) 2023-11-10 21:12:51 +01:00
expr.rs Spread operator for list literals (#11006) 2023-11-22 23:10:08 +02:00
expression.rs Spread operator for list literals (#11006) 2023-11-22 23:10:08 +02:00
import_pattern.rs Recursively export constants from modules (#10049) 2023-08-20 14:51:35 +02:00
match_pattern.rs add match guards (#9621) 2023-07-16 12:25:12 +12:00
mod.rs Add pattern matching (#8590) 2023-03-24 14:52:01 +13:00
operator.rs Allow operator in constants (#10212) 2023-09-05 16:35:58 +02:00
pipeline.rs Support o>>, e>>, o+e>> to append output to an external file (#10764) 2023-11-27 07:52:39 -06:00