lib/utils/autocomplete.js/autocomplete
const autocomplete = () => {
  const servicePath = process.cwd();
  return getServerlessConfigFile(servicePath)
    .then((serverlessConfigFile) => 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 getSuggestions(cacheFile.commands); // eslint-disable-line consistent-return
      }));
};