Skip to content

Documentation on redirect doesn't match behaviour #2152

@Rots

Description

@Rots

Note that file redirections are scoped to an expression and apply to all external commands in the expression. In the example below, `out.txt` will contain `hello\nworld`:

> let text = "hello\nworld";
($text | head -n 1; $text | tail -n 1) o> out.txt
hello
> cat out.txt
world
> nu --version
0.112.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions