-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Suggestion: make it easier to discover which cmdlet parameters accept wildcard patterns, via the syntax diagram #4715
Description
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-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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status