Implement select widget

This commit is contained in:
Juan Cruz Viotti 2014-11-24 08:45:15 -04:00
parent 8ee2568144
commit 51c6a8b4c2

View File

@ -15,6 +15,17 @@ exports.login = (callback) ->
}
], _.partial(callback, null))
exports.select = (message, list, callback) ->
inquirer.prompt [
{
type: 'list'
name: 'option'
message: message or 'Select an option'
choices: list
}
], (response) ->
return callback(null, response.option)
exports.confirmRemoval = (name, callback) ->
inquirer.prompt [
{