From 77b91395928fe0b5e1801f02f7dfd4eef395a9e1 Mon Sep 17 00:00:00 2001 From: silverqx Date: Thu, 15 Aug 2024 00:39:34 +0200 Subject: [PATCH] tools added ArgumentCompletions() For common branches. --- tools/Get-VcpkgHash.ps1 | 2 ++ tools/qvcpkg-hash.ps1 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/Get-VcpkgHash.ps1 b/tools/Get-VcpkgHash.ps1 index 883d4d5ed..891f8fdae 100644 --- a/tools/Get-VcpkgHash.ps1 +++ b/tools/Get-VcpkgHash.ps1 @@ -12,6 +12,7 @@ Param( HelpMessage = 'Specifies a branch for which to download the package archive (works with ' + 'a commit ID too).')] [ValidateNotNullOrEmpty()] + [ArgumentCompletions('develop', 'main')] [string] $Branch = 'main', [Parameter(Position = 1, Mandatory, ParameterSetName = 'Tag', ValueFromPipeline, @@ -33,6 +34,7 @@ Param( ValueFromPipelineByPropertyName, HelpMessage = 'Specifies a git object, it can be the tag, commit ID, or branch.')] [ValidateNotNullOrEmpty()] + [ArgumentCompletions('develop', 'main')] [string] $Ref, [Parameter(HelpMessage = 'Specifies how many times PowerShell retries a connection when ' + diff --git a/tools/qvcpkg-hash.ps1 b/tools/qvcpkg-hash.ps1 index 998dfeb12..bcfed8f83 100644 --- a/tools/qvcpkg-hash.ps1 +++ b/tools/qvcpkg-hash.ps1 @@ -7,6 +7,7 @@ Param( HelpMessage = 'Specifies a branch for which to download the package archive (works with ' + 'a commit ID too).')] [ValidateNotNullOrEmpty()] + [ArgumentCompletions('develop', 'main')] [string] $Branch = 'main', [Parameter(Position = 0, Mandatory, ParameterSetName = 'Tag', ValueFromPipeline, @@ -28,6 +29,7 @@ Param( ValueFromPipelineByPropertyName, HelpMessage = 'Specifies a git object, it can be the tag, commit ID, or branch.')] [ValidateNotNullOrEmpty()] + [ArgumentCompletions('develop', 'main')] [string] $Ref )