From dc824d2e9acc3f304a4236a9da06aa11d72eba03 Mon Sep 17 00:00:00 2001 From: Reyes Yang Date: Fri, 13 Sep 2013 11:31:06 +0800 Subject: [PATCH] Add function snippet for shell --- snippets/sh.snippets | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/snippets/sh.snippets b/snippets/sh.snippets index 8b03e0c..6bf7089 100644 --- a/snippets/sh.snippets +++ b/snippets/sh.snippets @@ -82,3 +82,11 @@ snippet getopt shift $(($OPTIND-1)) snippet root if [ $(id -u) -ne 0 ]; then exec sudo $0; fi +snippet fun + ${1:function_name}() { + ${0:#function_body} + } +snippet ffun + function ${1:function_name}() { + ${0:#function_body} + }