Skip to content

Verb, StrictModeVersion and Scope Argument completers don't handle single/double quotes for parameter text completion #24838

@ArmaanMcleod

Description

@ArmaanMcleod

Prerequisites

Steps to reproduce

Currently for the following Argument Completers:

  • VerbArgumentCompleter
  • StrictModeVersionArgumentCompleter
  • ScopeArgumentCompleter

There is no completion if the user inputs single quote ' or double quote " before pressing TAB. This is because these argument completers do not use HandleDoubleAndSingleQuote in comparison to some other completers.

These completers should probably reuse a method which calls HandleDoubleAndSingleQuote so this logic can be shared across them.

Expected behavior

PS> Set-StrictMode -Version Lat -> Should complete to Latest
PS> Set-StrictMode -Version 'Lat -> Should complete to 'Latest'
PS> Set-StrictMode -Version "Lat -> Should complete to "Latest"

PS> Get-Variable -Scope Glo -> Should complete to Global
PS> Get-Variable -Scope 'Glo -> Should complete to 'Global'
PS> Get-Variable -Scope "Glo -> Should complete to "Global"

Actual behavior

PS> Set-StrictMode -Version Lat -> This completes to Latest
PS> Set-StrictMode -Version 'Lat -> This does not complete to 'Latest'
PS> Set-StrictMode -Version "Lat -> This does not complete to "Latest"

PS> Get-Variable -Scope Glo -> This completes to Global
PS> Get-Variable -Scope 'Glo -> This does not complete to 'Global'
PS> Get-Variable -Scope "Glo -> This does not complete to "Global"

Error details

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.0-preview.3
PSEdition                      Core
GitCommitId                    7.5.0-preview.3-241-g2e97dd4d5ae2b1a3c5440fe8f91777059db27b89
OS                             Microsoft Windows 10.0.26100
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

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueWG-Interactive-Consolethe console experienceWG-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