Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix Get-Help not properly displaying if parameter supports wildcards#13353

Merged
adityapatwardhan merged 4 commits intoPowerShell:masterfrom
ThomasNieto:fix_parameter_globbing
Aug 11, 2020
Merged

Fix Get-Help not properly displaying if parameter supports wildcards#13353
adityapatwardhan merged 4 commits intoPowerShell:masterfrom
ThomasNieto:fix_parameter_globbing

Conversation

@ThomasNieto
Copy link
Contributor

@ThomasNieto ThomasNieto commented Aug 4, 2020

PR Summary

This PR is to fix the issue with Get-Help not properly displaying if a parameter supports wildcards when a script cmdlet has no comment-based help.

Before

C:\> function foo { param([SupportsWildcards()] $Bar) $Bar }
C:\> Get-Help foo -Parameter Bar

-Bar <Object>
    
    Required?                    false
    Position?                    0
    Accept pipeline input?       false
    Parameter set name           (All)
    Aliases                      None
    Dynamic?                     false

After

C:\> function foo { param([SupportsWildcards()] $Bar) $Bar }
C:\> Get-Help foo -Parameter Bar

-Bar <Object>

    Required?                    false
    Position?                    0
    Accept pipeline input?       false
    Parameter set name           (All)
    Aliases                      None
    Dynamic?                     false
    Accept wildcard characters?  true

PR Context

This PR solves the code issue with #4716 but not the other part of adding [SupportsWildcards] attribute to the identified cmdlets. That will be fixed in another PR.

PR Checklist

@adityapatwardhan
Copy link
Member

@ThomasNieto This looks great! Could you add a before v/s after of the output in the description.

@ThomasNieto
Copy link
Contributor Author

@adityapatwardhan Sure, its been added.

@ThomasNieto
Copy link
Contributor Author

@adityapatwardhan think you'll be able to merge today so I can start work on #2490? 😄

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Aug 6, 2020
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Aug 6, 2020
@ThomasNieto
Copy link
Contributor Author

@adityapatwardhan are there anymore changes needed before merging?

@adityapatwardhan adityapatwardhan added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Aug 11, 2020
@adityapatwardhan adityapatwardhan merged commit 46efd38 into PowerShell:master Aug 11, 2020
@adityapatwardhan
Copy link
Member

@ThomasNieto Thank you for your contribution!

@ghost
Copy link

ghost commented Aug 17, 2020

🎉v7.1.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants