dthree / dthree/vorpal

Multiple-Instances BUG

Open
#280 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.6k
Forks
278
PR merge metrics
No merged PRs in 30d

Description

Hi
Creating multiple instances using Vorpal() has issues in auto-generated help even when .show() is not called and .hide() has no effect on it.
it will list all helps from those Vorpal's instances in multiple lines .
eg:
`let main=new Vorpal();
let sys = new Vorpal();
sys.delimiter('sys');
sys.command('say [words...]').action((args,cb)=>{console.log(args.words)});
main.command('mode [modes]').action((args,cb)=>{
if(args.mode=='system'){
sys.show();
main.hide() //it doesn't really matter to be or not , or before sys.show() or after !
};
cb();
});
main.delimiter('main').show()`

When pressing [tab tab] it will show something like this
quit help mode

quit help say

What should I do to fix this ?
the "mode" is not complete enough to serve as an instance, the instance has this problem .
Is there any way ? any trick ? am I doing this right at all ?

Best Regards

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.