Skip to content

Add parameter name and value completion for hashtables used for splatting #7789

@SeeminglyScience

Description

@SeeminglyScience

When getting completion results while in a hashtable that is used for splatting, completion should treat keys as parameter names and values as arguments.

This would be easiest supported easiest when

  1. The HashtableAst is on the RHS of an AssignmentStatementAst
  2. A VariableExpressionAst is on the LHS
  3. The same variable is splatted in a CommandAst

Ideally completion features would be the same as when in the CommandAst, such as

  1. Keys are completed as parameter names
  2. Values would take ArgumentCompleter, ValidateSet, Enum typed parameters, etc into account
  3. Parameters already bound in the CommandAst would be excluded

/cc @TheIncorrigible1

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.1.0
PSEdition                      Core
GitCommitId                    6.1.0
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.WG-Interactive-IntelliSensetab completion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions