diff --git a/snippets/sh.snippets b/snippets/sh.snippets index 94174f3..508056c 100644 --- a/snippets/sh.snippets +++ b/snippets/sh.snippets @@ -38,3 +38,6 @@ snippet go ${4:#staments};; esac done +# Set SCRIPT_DIR variable to directory script is located. +snippet sdir + SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"