Closed jstrika closed 8 years ago
Erm, could you please try adding a callback to that method? i.e.
function switch(vorpal) {
vorpal.command('switch <instance>')
.action(function (args, cb) {
instances[args.instance].show();
cb();
});
return vorpal;
}
Yep, that did the trick ;)
For others to benefit': this feature allows us to create navigation between multiple menus. And if you push the instance name to an Array, you can add commands such a "back" or "show breadcrumbs" that can be shared between menus.
BTW: @dthree - great job with Vorpal !
Great and thanks!
:smile:
In one of your examples, you demonstrated how to switch between multiple instances.
Using version 1.4.0, it does work on first ''switch'', but switching again to the same instance will exit.