Skip to content

Commit

Permalink
feat: use enquirer autocomplete prompt for repos list
Browse files Browse the repository at this point in the history
  • Loading branch information
slavik-chapelskyi committed Feb 7, 2020
1 parent 38e9af9 commit 34ac8f5
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/inquirer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 34ac8f5

Please sign in to comment.