In the command.remove() example I can find and remove one command.
Eg.
const all = vorpal.find('*');
for (var cmd of all) {
cmd.remove();
}
Is there an official way to remove all commands?
It's simple enough that there doesn't really need to be an API method for it.
All commands are exposed through vorpal.commands
. So:
vorpal.commands.forEach(function (cmd) {
cmd.remove();
});
That should work.