As Jeffrey mentioned in an earlier Blog “Finding which parameters are used the most” The Monad team is in the process of cleaning up our cmdlets to promote a more consistent user experience. The following two areas which we are focused on might have impact on you:
Cmdlet Verb names consistency and Parameters naming consistency.
Cmdlet Verb names consistency
The changes we are introducing might cause you to have to modify many of your existing scripts and possibly some code. Among the changes that will have direct effect on you are the cmdlet verb names changes which are as follows:
· Combine-Path will be renamed to Join-Path
· Parse-Path will be renamed to Split-Path
· Match-String will be renamed to Select-String
· Time-Expression will be renamed to Measure-Command
· Write-Object will be renamed to Write-Output
This change will ensure Monad core cmdlets conform with the verb naming guidelines described in the Monad SDK.
Parameters naming consistency
We are still in the process of implementing this cleanup phase and no concrete details are available as of yet to be publicly announced. The following shows a sample for some of the guidelines we will be using to complete this cleanup phase:
Issue
If a parameter has the same name across cmdlets, it should have the same type and semantics. You should use the same parameter name for the same concepts.
For example:
Match-String and Tee-Object cmdlets should use a –Path parameter aliased to MshPath instead of –FileName to have a consistent user experience across the different cmdlets.
Parameter names should be verbose and allow you to easily disambiguate them by simply typing the first three characters or using aliases. You only have to provide enough of a parameter name to disambiguate it but you can also use parameter aliases. We must use parameter aliases when parameters cannot be disambiguated easily using the first three characters.
For example:
-OutBuffer (-ob) and -OutVariable (-ov)
Both OutBuffer and OutVariable start with “out” which can only be disambiguated when more then the first three characters are used. The –ob and –ov parameter aliases resolve this issue
This posting is simply a heads-up on what will possibly be in the next release. Any thoughts or feedback is appreciated.
[Edit: Monad has now been renamed to Windows PowerShell. This script or discussion may require slight adjustments before it applies directly to newer builds.]
0 comments