File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 502502 "default" : true ,
503503 "description" : " Specifies the visibility of the Command Explorer in the PowerShell Side Bar."
504504 },
505+ "powershell.sideBar.CommandExplorerExcludeFilter" : {
506+ "type" :" array" ,
507+ "default" :" " ,
508+ "description" : " Specify array of Modules to exclude from Command Explorer listing."
509+ },
505510 "powershell.powerShellExePath" : {
506511 "type" : " string" ,
507512 "default" : " " ,
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ export class GetCommandsFeature implements IFeature {
6464 return ;
6565 }
6666 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 ) ) ;
6770 this . commandsExplorerProvider . powerShellCommands = result . map ( toCommand ) ;
6871 this . commandsExplorerProvider . refresh ( ) ;
6972 } ) ;
You can’t perform that action at this time.
0 commit comments