Files
jak-project/scripts/tasks/completions/task.ps1
T
Tyler Wilding 728d234976 scripts: update scripts and docs to support multiple games (#1584)
scripts: update scripts and docs to support multi-games disable broken scripts for now
2022-06-30 20:17:06 -04:00

10 lines
397 B
PowerShell

$scriptBlock = {
param($commandName, $wordToComplete, $cursorPosition)
$regex = "task(?:.exe)? (.*)$"
$startsWith = $wordToComplete | Select-String $regex -AllMatches | ForEach-Object { $_.Matches.Groups[1].Value }
$listOutput = $(task --list-all --silent)
$listOutput | Where-Object {$_ -like "$startsWith*"}
}
Register-ArgumentCompleter -Native -CommandName task -ScriptBlock $scriptBlock