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 503
503
"default" : true ,
504
504
"description" : " Specifies the visibility of the Command Explorer in the PowerShell Side Bar."
505
505
},
506
+ "powershell.sideBar.CommandExplorerExcludeFilter" : {
507
+ "type" :" array" ,
508
+ "default" :" " ,
509
+ "description" : " Specify array of Modules to exclude from Command Explorer listing."
510
+ },
506
511
"powershell.powerShellExePath" : {
507
512
"type" : " string" ,
508
513
"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