ps/Modules/Cole.PowerShell.Developer/Public/Show-Verbs.ps1

17 lines
406 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
function Show-Verbs {
<#
.SYNOPSIS
Show the verbs so I can figure out which one I want
#>
param(
[Parameter(Mandatory = $false, Position = 0)]
[string]$VerbPartial
)
$verbs = (Get-Verb).Verb
[array]$matchedVerbs = $verbs.Where({$_ -match $VerbPartial}) | Sort-Object
# TODO: If verbs list is empty, give a better error message
Show-ListAsTable $matchedVerbs
}