/**
 * selectInterface
 */ import inquirer from 'inquirer' ; export default async function selectInterface ( iface = 'eth0' , ifaces ) { const questions = [ { type : 'list' , name : 'option' , message : 'Select interface: ' , choices : ifaces , default : iface } ] ; return new Promise ( function ( resolve ) { inquirer . prompt ( questions ) . then ( function ( options ) { resolve ( options . option ) ; } ) ; } ) ; }