Description
ISE
VS Code
Script
function MyTestCompletion {
param($wordToComplete, $commandAst)
$commandTree = & {
New-CommandTree build "Compile the current package" {
New-CommandTree "--quiet" "output printed to stdout"
New-CommandTree "--package" "Package to build (see `cargo help pkgid`)"
New-CommandTree "--all" "for --workspace (deprecated)"
New-CommandTree "-workspace" "all packages in the workspace"
New-CommandTree "-exclude" "Exclude packages from the build"
}
}
Get-CommandTreeCompletion $wordToComplete $commandAst $commandTree
}
Register-ArgumentCompleter -CommandName mytest -Native -ScriptBlock $function:MyTestCompletion