Skip to content

Autocomplete should quote property names ending in "?" #10436

@HumanEquivalentUnit

Description

@HumanEquivalentUnit

Property names ending with ? character can't be used unless the property name is quoted, but autocomplete with TAB does not quote them. (Related to discussion in #3240)

Steps to reproduce

$o = [PSCustomObject]@{
    'test?' = 1
    'test|' = 2
}

PS C:\> $o.test{TAB}
# cycles through
# $o.test?      # this won't work without quotes around the property name
# $o.'test|'

Expected behavior

PS C:\> $o.test{TAB}
# cycles through
# $o.'test?'                # expected, this one is quoted
# $o.'test|'

Environment data

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.1
PSEdition                      Core
GitCommitId                    7.0.0-preview.1
OS                             Microsoft Windows 10.0.17763
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-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreWG-Interactive-IntelliSensetab completion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions