From 34ac8f5c04b9341a05b6f043633aeec27c513f87 Mon Sep 17 00:00:00 2001 From: Yaroslav Chapelskyi Date: Fri, 7 Feb 2020 12:44:38 +0200 Subject: [PATCH] feat: use enquirer autocomplete prompt for repos list --- src/inquirer.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/inquirer.ts b/src/inquirer.ts index 6cd42da8..73ec0746 100644 --- a/src/inquirer.ts +++ b/src/inquirer.ts @@ -2,6 +2,7 @@ import inquirer from 'inquirer'; import chalk from 'chalk'; import ora from 'ora'; import _ from 'lodash'; +import {prompt} from 'enquirer'; import logSymbols from 'log-symbols'; import ProgressBar from 'progress'; import getCliWidth from 'cli-width'; @@ -40,15 +41,12 @@ export async function askRepo(org) { return process.exit(0); } - const {repo} = await inquirer.prompt([ - { - type: 'list', - name: 'repo', - message: 'Repository?', - pageSize: choices.length, - choices - } - ]); + const {repo} = await prompt({ + type: 'autocomplete', + name: 'repo', + message: 'Repository?', + choices + }); return repo; }