mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-02-13 15:26:57 +08:00
40 lines
889 B
JavaScript
Executable File
40 lines
889 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
// const {execShell} = require("./.exec");
|
|
|
|
(async ()=>{
|
|
const { AutoComplete } = require('enquirer');
|
|
|
|
const prompt = new AutoComplete({
|
|
name: 'flavor',
|
|
message: 'Pick your favorite flavor',
|
|
limit: 10,
|
|
initial: 2,
|
|
choices: [
|
|
'Almond',
|
|
'Apple',
|
|
'Banana',
|
|
'Blackberry',
|
|
'Blueberry',
|
|
'Cherry',
|
|
'Chocolate',
|
|
'Cinnamon',
|
|
'Coconut',
|
|
'Cranberry',
|
|
'Grape',
|
|
'Nougat',
|
|
'Orange',
|
|
'Pear',
|
|
'Pineapple',
|
|
'Raspberry',
|
|
'Strawberry',
|
|
'Vanilla',
|
|
'Watermelon',
|
|
'Wintergreen'
|
|
]
|
|
});
|
|
|
|
prompt.run()
|
|
.then(answer => console.log('Answer:', answer))
|
|
.catch(console.error);
|
|
})() |