@@ -123,6 +123,7 @@ public void Start()
123
123
124
124
this . messageHandlers . SetRequestHandler ( ShowOnlineHelpRequest . Type , this . HandleShowOnlineHelpRequest ) ;
125
125
this . messageHandlers . SetRequestHandler ( ShowHelpRequest . Type , this . HandleShowHelpRequest ) ;
126
+
126
127
this . messageHandlers . SetRequestHandler ( ExpandAliasRequest . Type , this . HandleExpandAliasRequest ) ;
127
128
128
129
this . messageHandlers . SetRequestHandler ( FindModuleRequest . Type , this . HandleFindModuleRequest ) ;
@@ -251,22 +252,26 @@ protected async Task HandleShowHelpRequest(
251
252
} catch [System.Management.Automation.PSInvalidOperationException] {
252
253
Microsoft.PowerShell.Core\Get-Help $CommandName -Full
253
254
}" ;
255
+
254
256
if ( string . IsNullOrEmpty ( helpParams ) ) { helpParams = "Get-Help" ; }
255
257
256
258
PSCommand checkHelpPSCommand = new PSCommand ( )
257
259
. AddScript ( CheckHelpScript , useLocalScope : true )
258
260
. AddArgument ( helpParams ) ;
261
+
259
262
await editorSession . PowerShellContext . ExecuteCommand < PSObject > ( checkHelpPSCommand , sendOutputToHost : true ) ;
260
263
await requestContext . SendResult ( null ) ;
261
264
}
265
+
262
266
protected async Task HandleShowOnlineHelpRequest (
263
267
string helpParams ,
264
268
RequestContext < object > requestContext
265
269
)
266
270
{
267
271
PSCommand commandDeprecated = new PSCommand ( )
268
272
. AddCommand ( "Microsoft.PowerShell.Utility\\ Write-Verbose" )
269
- . AddParameter ( "Message" , ";powerShell/showOnlineHelp' has been deprecated. Use 'powerShell/showHelp' instead." ) ;
273
+ . AddParameter ( "Message" , "'powerShell/showOnlineHelp' has been deprecated. Use 'powerShell/showHelp' instead." ) ;
274
+
270
275
await editorSession . PowerShellContext . ExecuteCommand < PSObject > ( commandDeprecated , sendOutputToHost : true ) ;
271
276
await this . HandleShowHelpRequest ( helpParams , requestContext ) ;
272
277
}
0 commit comments