Skip to content

Instantly share code, notes, and snippets.

@0x1ad2
Created July 26, 2019 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x1ad2/7a129fae6be1f54b6c4a271f3f8f600e to your computer and use it in GitHub Desktop.
Save 0x1ad2/7a129fae6be1f54b6c4a271f3f8f600e to your computer and use it in GitHub Desktop.
// require the enquirer module
const { MultiSelect } = require("enquirer");
// create a new multi select prompt
const multiSelectPrompt = new MultiSelect({
name: "value",
message: "Select all the binaries that you want to install",
choices: frequentlyUsedBinaries
});
// run the prompt and handle the answer
multiSelectPrompt
.run()
.then(binaries => {
console.log("Selected binaries:", binaries);
})
.catch(console.error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment