Skip to content

add SupportsWildcard attribute for info to appear in cmdlet help #658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/code/FindPSResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public sealed class FindPSResource : PSCmdlet
/// <summary>
/// Specifies name of a resource or resources to find. Accepts wild card characters.
/// </summary>
[SupportsWildcards]
[Parameter(Position = 0,
ValueFromPipeline = true,
ParameterSetName = ResourceNameParameterSet)]
Expand Down
1 change: 1 addition & 0 deletions src/code/GetPSResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public sealed class GetPSResource : PSCmdlet
/// <summary>
/// Specifies the desired name for the resource to look for.
/// </summary>
[SupportsWildcards]
[Parameter(Position = 0, ValueFromPipeline = true)]
public string[] Name { get; set; }

Expand Down
1 change: 1 addition & 0 deletions src/code/GetPSResourceRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public sealed class GetPSResourceRepository : PSCmdlet
/// Specifies the name(s) of a registered repository to find.
/// Supports wild card characters.
/// </summary>
[SupportsWildcards]
[Parameter(Position = 0, ValueFromPipeline = true)]
[ArgumentCompleter(typeof(RepositoryNameCompleter))]
[ValidateNotNullOrEmpty]
Expand Down
9 changes: 5 additions & 4 deletions src/code/UninstallPSResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public sealed class UninstallPSResource : PSCmdlet
/// Specifies the exact names of resources to uninstall.
/// A comma-separated list of module names is accepted. The resource name must match the resource name in the repository.
/// </summary>
[SupportsWildcards]
[Parameter(Mandatory = true, Position = 0, ValueFromPipeline = true, ParameterSetName = NameParameterSet)]
[ValidateNotNullOrEmpty]
public string[] Name { get; set; }
Expand Down Expand Up @@ -54,10 +55,10 @@ public sealed class UninstallPSResource : PSCmdlet
[Parameter]
public SwitchParameter SkipDependencyCheck { get; set; }

/// <summary>
/// Specifies the scope of installation.
/// </summary>
[Parameter]
/// <summary>
/// Specifies the scope of installation.
/// </summary>
[Parameter]
public ScopeType Scope { get; set; }

#endregion
Expand Down
1 change: 1 addition & 0 deletions src/code/UpdatePSResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public sealed class UpdatePSResource : PSCmdlet
/// Specifies name of a resource or resources to update.
/// Accepts wildcard characters.
/// </summary>
[SupportsWildcards]
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string[] Name { get; set ; } = new string[] {"*"};
Expand Down