File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 128128 "command" : " PowerShell.SelectPSSARules" ,
129129 "title" : " Select PSScriptAnalyzer Rules" ,
130130 "category" : " PowerShell"
131+ },
132+ {
133+ "command" : " PowerShell.ShowSessionOutput" ,
134+ "title" : " Show Session Output" ,
135+ "category" : " PowerShell"
131136 }
132137 ],
133138 "snippets" : [
Original file line number Diff line number Diff line change @@ -144,12 +144,12 @@ function onInputEntered(responseText: string): ShowInputPromptResponseBody {
144144}
145145
146146export class ConsoleFeature implements IFeature {
147- private command : vscode . Disposable ;
147+ private commands : vscode . Disposable [ ] ;
148148 private languageClient : LanguageClient ;
149149 private consoleChannel : vscode . OutputChannel ;
150150
151151 constructor ( ) {
152- this . command =
152+ this . commands = [
153153 vscode . commands . registerCommand ( 'PowerShell.RunSelection' , ( ) => {
154154 if ( this . languageClient === undefined ) {
155155 // TODO: Log error message
@@ -175,7 +175,13 @@ export class ConsoleFeature implements IFeature {
175175
176176 // Show the output window if it isn't already visible
177177 this . consoleChannel . show ( vscode . ViewColumn . Three ) ;
178- } ) ;
178+ } ) ,
179+
180+ vscode . commands . registerCommand ( 'PowerShell.ShowSessionOutput' , ( ) => {
181+ // Show the output window if it isn't already visible
182+ this . consoleChannel . show ( vscode . ViewColumn . Three ) ;
183+ } )
184+ ] ;
179185
180186 this . consoleChannel = vscode . window . createOutputChannel ( "PowerShell Output" ) ;
181187 }
@@ -197,7 +203,7 @@ export class ConsoleFeature implements IFeature {
197203 }
198204
199205 public dispose ( ) {
200- this . command . dispose ( ) ;
206+ this . commands . forEach ( command => command . dispose ( ) ) ;
201207 this . consoleChannel . dispose ( ) ;
202208 }
203209}
You can’t perform that action at this time.
0 commit comments