How to disable open new terminal command from quick open widget?

I have written to hide the menu option of the terminal from the UI but from quick open modal(Ctrl+Shift+p), I can able to open a new terminal. So can you help me how to restrict that.

It is not just restricted to open a new terminal but for all the option which I want to hide from the UI, I want to restrict the same from quick open widget.

[original thread by satya-dash]

You need to override

@satya-dash are you attempting to remove the menu and command for New Terminal?


@vince-fugnitto Yes. Need to trigger that from different menu.

you can always remove it from a menu, and add it to a different menu item if you’d like

when registering your menu action, you can reference the original command from the TerminalCommands namespace

How to disable Terminal from the Main menu ?

Disable or remove? If you want to remove it, here is an example:

If you want to disable it, I would recommend un-registering the command, and re-register it with the same ID, but different isEnabled implementation of the corresponding command handler. I have not tried it but should work.

Note, in electron, all menus are enabled:

what is the ID or Command for Terminal ?
So that I can unregister it.

I get the below error in browser.
bundle.js:57889 Error: Ambiguous match found for serviceIdentifier: WorkspaceFrontendContribution

The ID is terminal:new.

This is the my workflow figuring out what the ID is:

I hope this helps.


Thanks @kittaakos. It really helped alot.