Skip to content

Instantly share code, notes, and snippets.

@delabassee
Last active December 19, 2018 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delabassee/7f70d686a8080542b3fe760c9f9b31f6 to your computer and use it in GitHub Desktop.
Save delabassee/7f70d686a8080542b3fe760c9f9b31f6 to your computer and use it in GitHub Desktop.
Simple Dive wrapper to explore an Fn function layers
#!/bin/bash
if [[ "$#" -ne 2 ]]; then
echo "Illegal number of arguments, it should be '<myapp>' '<myfunction>'."
else
FUNC="$(fn list fn $1 | grep $2 | grep -o '[0-9a-zA-Z\-\.\_\/]*:[0-9a-zA-Z.]*')"
if [ $? -eq 0 ]; then
dive "$FUNC"
else
echo "Unable to find the function, check the arguments."
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment