Created
May 13, 2016 14:59
-
-
Save gerane/1925324d7ea7e3c767eb45abcde91e8b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-TestCommand { | |
$Extensions = Get-Childitem -path "$Env:USERPROFILE\.vscode-insiders\extensions\gerane*" -Directory | |
$caption = "Please select a an Extension" | |
$message = "Package.json will be launched" | |
[int]$defaultChoice = 0 | |
$Choices = [System.Management.Automation.Host.ChoiceDescription[]] @($Extensions.Name) | |
$TestParam = $host.ui.PromptForChoice($caption,$message, $choices,$defaultChoice) | |
$ExtDir = $Extensions[$TestParam].FullName | |
$Package = Get-ChildItem -path "$ExtDir\package.json" | |
$psEditor.Workspace.OpenFile($Package) | |
} | |
Register-EditorCommand ` | |
-Name "MyModule.OpenExtPackageJson" ` | |
-DisplayName "Open Extension Package.json" ` | |
-Function Invoke-TestCommand |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment