Skip to content

Unquoted numbers with two or more dots should cast to a [version] rather than$Null #15756

@iRon7

Description

@iRon7

Related: How can Powershell compares between string and double?

Summary of the new feature / enhancement

Currently an unquoted number with two or more dots casts to a $Null instead of leaving an expected ... is not recognized as a name of a cmdlet error.

$Version = 2.0.9
$Null -eq $Version
True

I would like to suggest to cast numbers with 3 or 4 dots (as 2.0.9 and 2.0.7.0) automatically to a version as a semantic PowerShell sugar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions