File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 502
502
"default" : true ,
503
503
"description" : " Specifies the visibility of the Command Explorer in the PowerShell Side Bar."
504
504
},
505
+ "powershell.sideBar.CommandExplorerExcludeFilter" : {
506
+ "type" :" array" ,
507
+ "default" :" " ,
508
+ "description" : " Specify array of Modules to exclude from Command Explorer listing."
509
+ },
505
510
"powershell.powerShellExePath" : {
506
511
"type" : " string" ,
507
512
"default" : " " ,
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ export class GetCommandsFeature implements IFeature {
64
64
return ;
65
65
}
66
66
this . languageClient . sendRequest ( GetCommandRequestType , "" ) . then ( ( result ) => {
67
+ const SidebarConfig = vscode . workspace . getConfiguration ( "powershell.sideBar" ) ;
68
+ const excludeFilter = ( SidebarConfig . CommandExplorerExcludeFilter ) . map ( ( filter ) => filter . toLowerCase ( ) ) ;
69
+ result = result . filter ( ( command ) => ( excludeFilter . indexOf ( command . moduleName . toLowerCase ( ) ) === - 1 ) ) ;
67
70
this . commandsExplorerProvider . powerShellCommands = result . map ( toCommand ) ;
68
71
this . commandsExplorerProvider . refresh ( ) ;
69
72
} ) ;
You can’t perform that action at this time.
0 commit comments