From e9632107473173165810e58d581f1f75b60ff5a8 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 12 Jan 2025 21:41:28 +0100 Subject: [PATCH] Update Install-NerdFont to use 'ByName' parameter set for font installation --- src/functions/public/Install-NerdFont.ps1 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/functions/public/Install-NerdFont.ps1 b/src/functions/public/Install-NerdFont.ps1 index fabe4d9..96ce6cd 100644 --- a/src/functions/public/Install-NerdFont.ps1 +++ b/src/functions/public/Install-NerdFont.ps1 @@ -24,13 +24,25 @@ function Install-NerdFont { Installs all Nerd Fonts to the current user. #> [CmdletBinding( - DefaultParameterSetName = 'Name', + DefaultParameterSetName = 'ByName', SupportsShouldProcess )] [Alias('Install-NerdFonts')] param( + # Specify the name of the Nerd font(s) to install. + [Parameter( + ParameterSetName = 'ByName', + Mandatory, + ValueFromPipeline, + ValueFromPipelineByPropertyName + )] + [string[]] $Name, + # Specify to install all Nerd Font(s). - [Parameter(ParameterSetName = 'All', Mandatory)] + [Parameter( + ParameterSetName = 'All', + Mandatory + )] [switch] $All, # Specify the scope of where to install the font(s).