Files
go-task/completion/ps/task.ps1
2022-10-17 23:52:56 +08:00

9 lines
347 B
PowerShell

$scriptBlock = {
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters )
$reg = "\* ($commandName.+?):"
$listOutput = $(task --list-all)
$listOutput | Select-String $reg -AllMatches | ForEach-Object { $_.Matches.Groups[1].Value + " " }
}
Register-ArgumentCompleter -CommandName task -ScriptBlock $scriptBlock