old_contents: import prompt from 'prompt'
  import chalk from 'chalk'
  
  module.exports = function(value, options) {
  
    var getKeywords = function(value, cb){
  
      if(typeof(value) === 'string'){
        cb(null, value)
  
      } else {
        var schema = {
          properties: {
            keyword: {
              description: chalk.white('keyword:'),
              pattern: /^[a-zA-Z0-9][a-zA-Z0-9-_\.]+$/,
              message: 'keyword must be letters, digits, dashes, underscores and dots.',
              required: true
            }
          }
        }
  
        prompt.message = ''
        prompt.delimiter = ''
        prompt.start();
  
        prompt.get(schema, function (err, result) {
            cb(err, result.keyword)
        })
      }
    }
  
    getKeywords(value, function(err, data){
       if (err) return console.error(err);
       console.log("You are actualy looking for: "+ data);
    })
  
  }
  
new_contents: import prompt from 'prompt'
  import chalk from 'chalk'
  import Promise from 'bluebird'
  
  module.exports = function(argument, options) {
  
    const getKeywords = Promise.method((argument) => {
  
      if(typeof(argument) === 'string'){
        return argument;
      } else {
        var schema = {
          properties: {
            keyword: {
              description: chalk.white('keyword:'),
              pattern: /^[a-zA-Z0-9][a-zA-Z0-9-_\.]+$/,
              message: 'keyword must be letters, digits, dashes, underscores and dots.',
              required: true
            }
          }
        }
  
        prompt.message = ''
        prompt.delimiter = ''
        prompt.start();
  
        return Promise.fromCallback(function (callback){
          prompt.get(schema, callback)
        })
        .then((result) => result.keyword)
  
      }
    })
  
    const printResult = (keyword) => {
      console.log("You are actualy looking for: "+ keyword);
    }
  
    getKeywords(argument)
  
    .then(printResult)
  }
  
subject: Refactor search cli