Skip to content

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

Closed

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.

Activity

  1. added
    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
    on Jul 29, 2019
  2. msftrncs commented on Jul 29, 2019

    @msftrncs
    ContributorAuthor

    Weirdly, while I might thnk the PSReadLine crash is related to the result completion @{$}, and I can get the list to open on the test build of PR #10226, it still crashes out on certain variables selected for completion, some have braces, and some don't, so I haven't figured out what the deal is yet.

  3. added a commit that references this issue on Jul 31, 2019
  4. daxian-dbw commented on Oct 10, 2019

    @daxian-dbw
    Member

    This was fixed by PowerShell/PSReadLine#984. Fix is available in 2.0.0-beta5 PSReadLine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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