Related: #4135 and #4626.
Currently, it is not easy to discover which of a given cmdlet's / advanced function's parameters accept wildcard patterns as arguments
Using the example of Get-Item:
-
You can use Get-Help Get-Item -Full and then browse the entire topic for Accept wildcard characters? lines.
-
To query wildcard support for a given parameter, you can use:
Get-Help Get-Item -Parameter Path and read the description - however, due to a separate issue, most cmdlets do not allow programmatic discovery of wildcard-supporting parameters.
Neither option is convenient.
Perhaps the syntax diagrams could be enhanced with symbols that reflect support for wildcard patterns?
Something along the lines of (these are mere examples; the idea is to be concise):
-Param* <type>
Applied to the Get-Item example:
Get-Item [-Path*] <string[]> [-Filter <string>] [-Include* <string[]>] [-Exclude* <string[]>] [-Force] [-Credential <pscredential>] [-Stream <string[]>] [<CommonParameters>]
Get-Item -LiteralPath <string[]> [-Filter <string>] [-Include* <string[]>] [-Exclude* <string[]>] [-Force] [-Credential <pscredential>] [-Stream <string[]>] [<CommonParameters>]
Note: While the -Filter parameter supports wildcards for the FileSystem provider, this may not be true for all providers - what the -Filter parameter accepts is entirely provider-dependent; case in point: the wildcard-pattern language supported by the FileSystem provider differs (is less powerful than) PowerShell's wildcard-pattern language.
Written as of PowerShell Core v6.0.0-beta.6.
Related: #4135 and #4626.
Currently, it is not easy to discover which of a given cmdlet's / advanced function's parameters accept wildcard patterns as arguments
Using the example of
Get-Item:You can use
Get-Help Get-Item -Fulland then browse the entire topic forAccept wildcard characters?lines.To query wildcard support for a given parameter, you can use:
Get-Help Get-Item -Parameter Pathand read the description - however, due to a separate issue, most cmdlets do not allow programmatic discovery of wildcard-supporting parameters.Neither option is convenient.
Perhaps the syntax diagrams could be enhanced with symbols that reflect support for wildcard patterns?
Something along the lines of (these are mere examples; the idea is to be concise):
-Param* <type>Applied to the
Get-Itemexample:Note: While the
-Filterparameter supports wildcards for the FileSystem provider, this may not be true for all providers - what the-Filterparameter accepts is entirely provider-dependent; case in point: the wildcard-pattern language supported by the FileSystem provider differs (is less powerful than) PowerShell's wildcard-pattern language.Written as of
PowerShell Core v6.0.0-beta.6.