dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

Support the init method of a mode command preventing the mode being entered #324

Open Hexxeh opened 6 years ago

Hexxeh commented 6 years ago

In the case where my init method on a mode command performs some checks to determine whether entering the mode should be allowed, it doesn't appear to be possible to prevent the mode being entered without calling the private exitMode method.

Is this possible? If not, consider this a feature request. 😄