From 950d3f34015d16ca921ae33b7086823d752d8f54 Mon Sep 17 00:00:00 2001 From: Serhiy Oplakanets Date: Wed, 8 Feb 2012 16:23:49 +0200 Subject: [PATCH] Add 'sdir' snippet. Useful for sourcing configs, etc. --- snippets/sh.snippets | 3 +++ 1 file changed, 3 insertions(+) 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 )"