Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tab completion attempt at @ returns no result, @? crashes PSReadLine, or provides invalid result #10243

@msftrncs

Description

@msftrncs

Steps to reproduce

Attempt tab completion/intellisense of splats:

@<CTRL SPACE>
@?<CTRL SPACE> # CRASH PSReadLine
@?<TAB> # results in `@{$}` which is unusable as it tries to make a hashtable

tabexpansion2 also provides no results for ( '@' 1).

Environment data

Believed to occur in all versions, tested in 7.0.0-preview2 and Windows PowerShell on Win 10 Insiders.

Insights

I believe the example of @? crashing PSReadLine is related to the expansion to @{$}, and while it probably shows a bug in PSReadLine, PR #10226 would fix the completion (though its likely to be a new problem with the new @@ splats being worked on.

I am not sure yet why @ alone cannot start a completion, I'm trying to consider what the completion code can do about offering completions that wont work. I don't think there is currently a syntax that works for splatting variables with complex names, and I didn't see it in the RFC for Enhanced Splatting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-ExternalThe issue is caused by external component(s).WG-Interactive-IntelliSensetab completionWG-Interactive-PSReadLinePSReadline related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions