Skip to content

Custom tabexpansion tooltip shows in ISE but not VS Code #2405

Closed
PowerShell/PowerShellEditorServices
#1152
@dfinke

Description

@dfinke

ISE

image

VS Code

image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions