nushell/crates/nu-engine/src
WindSoilder ba4723cc9f
Support variables/interpolation in o>, e>, o+e> redirect (#9747)
# Description
Fixes:  #8517
Fixes: #9246
Fixes: #9709
Relative: #9723


## About the change
Before the pr, nushell only parse redirection target as a string(through
`parse_string` call).
In the pr, I'm trying to make the value more generic(using `parse_value`
with `SyntaxShape::Any`)

And during eval stage, we guard it to only eval `String`,
`StringInterpolation`, `FullCellPath`, `FilePath`, so other type of
redirection target like `1ms` won't be permitted.

# User-Facing Changes

After the pr: redirection support something like the following:
1. `let a = "x"; cat toolkit.nu o> $a`
2. `let a = "x"; cat toolkit.nu o> $"($a).txt"`
3. `cat toolkit.nu out> ("~/a.txt" | path expand)`
2023-07-20 13:56:46 +02:00
..
call_ext.rs Allow NU_LIBS_DIR and friends to be const (#8538) 2023-04-05 19:56:48 +03:00
column.rs revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
documentation.rs Change input/output types in help to a table (#9686) 2023-07-15 06:23:21 +12:00
env.rs Fix broken constants in scopes (#9679) 2023-07-14 00:02:05 +03:00
eval.rs Support variables/interpolation in o>, e>, o+e> redirect (#9747) 2023-07-20 13:56:46 +02:00
glob_from.rs allow paths to have brackets (#9416) 2023-06-13 07:30:10 -05:00
lib.rs split $nu variable into scope commands and simpler $nu (#9487) 2023-06-21 09:33:01 +12:00
scope.rs Remove broken compile-time overload system (#9677) 2023-07-14 07:05:03 +12:00