mokkabonna / inquirer-autocomplete-prompt

Autocomplete prompt for inquirer
ISC License
354 stars 82 forks source link

No reaction on Windows 10 console. #13

Closed alinnert closed 7 years ago

alinnert commented 8 years ago

Hi,

I'm really interested in this plugin. I also just discovered inquirer, so I'm not very experienced with it. I do know that the question type "list" works fine. But autocomplete doesn't show any reaction. I can't input any text nor can I select values from the list. The initial content of the list works fine though.

I've created this little test script:

'use strict';

const inquirer = require('inquirer');
inquirer.registerPrompt('autocomplete', require('inquirer-autocomplete-prompt'));

inquirer.prompt([
    {
        type: 'autocomplete',
        name: 'first',
        message: 'What do you want to do?',
        source: (answers, input) => {
            return new Promise((resolve, reject) => {
                resolve([input + ' 1', input + ' 2', input + ' 3']);
            });
        }
    }
], answers => {
    console.log(JSON.stringify(answers));
});

When I start it I get the output, which is fine obviously:

? What do you want to do? (Use arrow keys or type to search)
> null 1
  null 2
  null 3

But after showing the question the script basically "freezes". I can accept the first entry with enter or stop it with Ctrl + C.

SBoudrias commented 8 years ago

Make sure you're on the latest Node version. There was a bug on Windows.

alinnert commented 8 years ago

Okay, I forgot to mention. I'm using Node 5.4.0. So, latest version.

blahah commented 8 years ago

I get the same on OSX, node 5.5.0, inquirer-autocomplete-prompt 0.1.3

When the search prompt is shown I can type but the typed letters don't appear. If I hit enter the search runs and the typed letters appear next to the prompt. Arrow keys don't work, and enter chooses the first result.

devinus commented 8 years ago

Same issue as @Blahah

mokkabonna commented 7 years ago

Checked this now on windows 10 with node 6.9.5 LTS. It works mostly as expected, some slight visual problem.