Skip to content

Powershell does not expand '~' for external programs #20031

Closed
@xudyang1

Description

Prerequisites

Steps to reproduce

PS: ~ > pwsh --version
PowerShell 7.3.6
PS: ~ > cd .config/nvim
PS: .config/nvim > nvim ~/.bashrc # or code ~/.bashrc
  • The last command opens an empty .bashrc file in current directory in neovim/vscode

Expected behavior

`~` should be expanded to `$HOME`

Actual behavior

pwsh does not expand `~` for external command

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimeWG-ReviewedA Working Group has reviewed this and made a recommendation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions