Replies: 3 comments 2 replies
-
|
I'll also show the code here [ArgumentCompleter( {
param($Command, $Parameter, $WordToComplete, $CommandAst, $FakeBoundParams)
$psakeFile = './psakeFile.ps1'
switch ($Parameter) {
'Task' {
if ([string]::IsNullOrEmpty($WordToComplete)) {
Get-PSakeScriptTasks -buildFile $psakeFile | Select-Object -ExpandProperty Name
}
else {
Get-PSakeScriptTasks -buildFile $psakeFile |
Where-Object { $_.Name -match $WordToComplete } |
Select-Object -ExpandProperty Name
}
}
Default {
}
}
})] |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
This looks like a good addition. Thanks! @webtroter Can you make a PR for this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Yes I can do a PR. I just wanted some comment about my code and/or integration before. It works fine with me, but I can't tell for everyone. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
So I implemented an ArgumentCompleter for the Task parameter of build.ps1
I'm not sure if it's better in here or if I should also propose it to the PowershellBuild Team.
You can see my commit here : https://github.com/webtroter/Stucco/blob/patch-1/Stucco/template/build.ps1
Beta Was this translation helpful? Give feedback.
All reactions