PowerShell Should do Globbing for Cmdlets - at least for FileSystem Paths
Votes from Connect: 15
Original Date Submitted: 10/21/2010 7:25:53 AM
Description:
Contact Information
Handle: rkeithhill
Site Name: PowerShell
Feedback ID: 615447
Frequency: Always Happens
Regression: Yes, this happens in all previous versions
Problem Description:
It would be nice if you could decorate an advanced function parameter with an “AcceptsWildcard” attribute like this and have the parameter parsing code actually do the wildcard expansion for you. Of course the doc comment help should use the presence of this attribute to indicate correctly whether or not the parameter accepts wildcards. Perhaps the attribute would take an option to specify simple ([ ], *, ?), regex or custom (let me do it) wildcard expansion. That would be one less thing you would have to do in your cmdlet and as a result, one less thing folks would screw-up.
Product Studio item created by Connect Synchronizer due to creation of feedback ID 615447 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=615447).
Repro Steps:
Currently in order to support globbing, each cmdlet developer has to known to do this and get the incantation right. This is error prone and results in inconsistencies with 3rd party cmdlets in terms of globbing behavior. Also, advanced functions doc comment help could use the attribute to properly document parameter that "accept wildcards".
Expected Results:
I expect the PowerShell parameter parsing engine to do the globbing work for me. :-)
Internal BugId: 2720
