Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,11 @@
"default": true,
"description": "Specifies the visibility of the Command Explorer in the PowerShell Side Bar."
},
"powershell.sideBar.CommandExplorerExcludeFilter": {
"type":"array",
"default":"",
"description": "Specify array of Modules to exclude from Command Explorer listing."
},
"powershell.powerShellExePath": {
"type": "string",
"default": "",
Expand Down
3 changes: 3 additions & 0 deletions src/features/GetCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ export class GetCommandsFeature implements IFeature {
return;
}
this.languageClient.sendRequest(GetCommandRequestType, "").then((result) => {
const SidebarConfig = vscode.workspace.getConfiguration("powershell.sideBar");
const excludeFilter = (SidebarConfig.CommandExplorerExcludeFilter).map((filter) => filter.toLowerCase());
result = result.filter((command) => (excludeFilter.indexOf(command.moduleName.toLowerCase()) === -1));
this.commandsExplorerProvider.powerShellCommands = result.map(toCommand);
this.commandsExplorerProvider.refresh();
});
Expand Down