Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Broken tab-completion with file or directory names with spaces in the context of tilde-prefixed paths (~) #20851

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

Prerequisites

Steps to reproduce

Note:

The solution is the same on both platforms: preserve the unquoted status of an initial ~ if specified as such.

$null = New-Item -Force "$HOME/a test"

(TabExpansion2 'code ~/a').CompletionMatches[0].CompletionText
(TabExpansion2 'code ~/''a').CompletionMatches[0].CompletionText
(TabExpansion2 'code ~/"a').CompletionMatches[0].CompletionText

# Remove-Item "$HOME/a test" # clean up

Related:

Expected behavior

~/'a test'
~/'a test'
~/"a test"

That is, the unquoted status of the initial ~ should be preserved.

Actual behavior

'~/a test'
'~/a test'
'~/a test'

That is, all expansions resulted in inappropriate quoting in that the previously unquoted ~ - required to trigger PowerShell's tilde-expansion emulation when calling external programs - is now quoted.

Error details

No response

Environment data

PowerShell 7.4.0 on Unix-like platforms.

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.

    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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.