Created
July 26, 2019 09:52
-
-
Save 0x1ad2/7a129fae6be1f54b6c4a271f3f8f600e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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