1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

revert ps

This commit is contained in:
Valentin Maerten
2025-11-09 13:29:48 +01:00
parent b201033891
commit 4e9f40669e

View File

@@ -1,8 +1,6 @@
using namespace System.Management.Automation using namespace System.Management.Automation
$TaskCmd = if ($env:TASK_EXE) { $env:TASK_EXE } else { "task" } Register-ArgumentCompleter -CommandName task -ScriptBlock {
Register-ArgumentCompleter -CommandName $TaskCmd -ScriptBlock {
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)
if ($commandName.StartsWith('-')) { if ($commandName.StartsWith('-')) {
@@ -26,5 +24,5 @@ Register-ArgumentCompleter -CommandName $TaskCmd -ScriptBlock {
return $completions.Where{ $_.CompletionText.StartsWith($commandName) } return $completions.Where{ $_.CompletionText.StartsWith($commandName) }
} }
return $(& $commandName --list-all --silent) | Where-Object { $_.StartsWith($commandName) } | ForEach-Object { return $_ + " " } return $(task --list-all --silent) | Where-Object { $_.StartsWith($commandName) } | ForEach-Object { return $_ + " " }
} }