Powershell: Suggestion: Provide a type accelerator for [System.Management.Automation.SemanticVersion]

Created on 30 Mar 2017  路  8Comments  路  Source: PowerShell/PowerShell

Now that semantic version numbers (semver) are becoming ubiquitous, it would be nice to be able to do something like

$ [semver] '1.2.3-preview-02+build42'

Major Minor Patch Label         
----- ----- ----- -----         
    1     2     3 preview-02+build42

instead of what you currently need to do:

$ [System.Management.Automation.SemanticVersion] '1.2.3-preview-02+build42'
Issue-Enhancement Resolution-Fixed Up-for-Grabs WG-Language

Most helpful comment

Yes :) My first (and hopefully not last) PR.

All 8 comments

Ok, this looks mindlessly simple. Can I take this?

@oising: I can't speak for the team, but I think it's fine to just go ahead, now that you've announced your intent. Thanks for taking it on.

@oising consider it yours! I can only assign to formal team members so don't worry about that

Just a quick update - I got busy, and then got lost trying to get everything to build in VS2017 - but I'm back on track.

I don't see anything wrong with allowing [semver] in constrained language mode, so I'm permitting it there. If there's anything outlandish about this, bring it up in the PR review I guess.

@oising Can we close the Issue as fxed?

Yes :) My first (and hopefully not last) PR.

@oising Good start!

Was this page helpful?
0 / 5 - 0 ratings