To enable serverless bash completion:
- Install serverless:
npm -g serverless
- Append the
servereless.bashcode to the
.bash_profilefile in your home directory
This gitst is a fork of https://gist.github.com/davidgf/5bd76141aa70f9ed4d8f716851e68830.
It avoid using
find .to look for lambda functions: the command, if executed in the root directory or a big directory, can be really bad for performances.
It also add subcommand handling for non-functions.
The script instead look for the serverless project file
s-project.json starting from the current directory and looking up,
then if found look for lambda functions in that directory.
Keep an eye on serverless/serverless#187 to see if this feature is officially implemented by serverless.