Skip to content

Commit 4e9f406

Browse files
committed
revert ps
1 parent b201033 commit 4e9f406

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

completion/ps/task.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using namespace System.Management.Automation
22

3-
$TaskCmd = if ($env:TASK_EXE) { $env:TASK_EXE } else { "task" }
4-
5-
Register-ArgumentCompleter -CommandName $TaskCmd -ScriptBlock {
3+
Register-ArgumentCompleter -CommandName task -ScriptBlock {
64
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
75

86
if ($commandName.StartsWith('-')) {
@@ -26,5 +24,5 @@ Register-ArgumentCompleter -CommandName $TaskCmd -ScriptBlock {
2624
return $completions.Where{ $_.CompletionText.StartsWith($commandName) }
2725
}
2826

29-
return $(& $commandName --list-all --silent) | Where-Object { $_.StartsWith($commandName) } | ForEach-Object { return $_ + " " }
27+
return $(task --list-all --silent) | Where-Object { $_.StartsWith($commandName) } | ForEach-Object { return $_ + " " }
3028
}

0 commit comments

Comments
 (0)