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.
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.