Skip to content

A version of MyInvocation.Statement without redirect operators #25595

@alexsch01

Description

@alexsch01

Summary of the new feature / enhancement

As someone who was working on powershell PRs for npm (I don't represent them),

I found out that $MyInvocation.Statement (and the Internal equivalent in Windows PowerShell) in pwsh doesn't strip out the redirect operators

So like the following

npm -v > hello.txt

doesn't turn into

npm -v

currently, would be nice if there existed a variable that gave the stripped output

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions