nushell/crates/nu-engine/src
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
..
call_ext.rs Make FromValue take owned Values (#10900) 2023-10-31 19:47:00 +01:00
column.rs Use Record's public API in a bunch of places (#10927) 2023-11-08 14:24:00 +01:00
documentation.rs Add themes to help command when available #10318 (#10623) 2023-10-10 07:40:05 -05:00
env.rs Refactor env conversion, yeet Value::follow_cell_path_not... (#10926) 2023-11-08 23:57:24 +01:00
eval.rs Support o>>, e>>, o+e>> to append output to an external file (#10764) 2023-11-27 07:52:39 -06:00
glob_from.rs fix clippy (#10659) 2023-10-10 03:31:15 +13:00
lib.rs Allow operator in constants (#10212) 2023-09-05 16:35:58 +02:00
scope.rs Use Record APIs in nu-protocol/nu-engine (#10917) 2023-11-01 23:19:58 +01:00