lib/utils/autocomplete.js/autocomplete
const autocomplete = () => {
  let servicePath = process.cwd();
  return getServerlessConfigFile(servicePath)
    .then((serverlessConfigFile) => {
      if (!serverlessConfigFile) {
        servicePath = 'x';
      }
      return getCacheFile(servicePath)
        .then((cacheFile) => {
          if (!cacheFile || !cacheFileValid(serverlessConfigFile, cacheFile.validationHash)) {
            const serverless = new Serverless();
            return serverless.init().then(() => getCacheFile(servicePath));
          }
          return cacheFile;
        })
        .then((cacheFile) => {
          if (!cacheFile || !cacheFileValid(serverlessConfigFile, cacheFile.validationHash)) {
            return;
          }
          return getSugestions(cacheFile.commands); // eslint-disable-line consistent-return
        });
    });
};