dthree / dthree/vorpal

Tab-tab to get a list of commands, not working properly when using multiple instances of Vorpal

Open
#217 1 comment 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 guys, I recently found what I think is an undesired result when using tab-tab to get available commands while using multiple Vorpal instances. Using the exact example on the Vorpal page(http://vorpal.js.org/) (customization example), if you simply create two lists of commands to use via .use, and run the below you will get all of the functions for all instances and it will essentially display the delimiter and each instances commands for as many instances as you have. I've been trying to debug this for a day or so now, any feedback would be great:
Example:
const Vorpal = require('vorpal');
const chalk = Vorpal().chalk;
const unicorns = Vorpal()
.delimiter(chalk.magenta('unicorn-land~$'))
.use(require('./commands/campaignModeCmds'))
.history('unicorn-command-history');
const narwhals = Vorpal()
.delimiter(chalk.cyan('narwhal-land~$'))
.use(require('./commands/dataModeCmds'))
.history('narwhal-command-history');
unicorns
.show()
.parse(process.argv);

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.