We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents de98a53 + 68ecb7f commit 32b097bCopy full SHA for 32b097b
completion/ps/task.ps1
@@ -0,0 +1,10 @@
1
+$scriptBlock = {
2
+ param($commandName, $wordToComplete, $cursorPosition)
3
+ $curReg = "task{.exe}? (.*?)$"
4
+ $startsWith = $wordToComplete | Select-String $curReg -AllMatches | ForEach-Object { $_.Matches.Groups[1].Value }
5
+ $reg = "\* ($startsWith.+?):"
6
+ $listOutput = $(task -l)
7
+ $listOutput | Select-String $reg -AllMatches | ForEach-Object { $_.Matches.Groups[1].Value + " " }
8
+}
9
+
10
+Register-ArgumentCompleter -Native -CommandName task -ScriptBlock $scriptBlock
0 commit comments