From 2dba5c5289aab6046e095b7641a511aa4d49ba65 Mon Sep 17 00:00:00 2001 From: Gert Date: Mon, 2 Mar 2015 23:40:07 +0100 Subject: [PATCH] changed shebangs end function snippet Same pull request as before, but could not resolve rebasing problem. --- snippets/sh.snippets | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/snippets/sh.snippets b/snippets/sh.snippets index 910fe8b..4d2c62b 100644 --- a/snippets/sh.snippets +++ b/snippets/sh.snippets @@ -1,5 +1,8 @@ # Shebang. Executing bash via /usr/bin/env makes scripts more portable. snippet #! + #!/usr/bin/env sh + +snippet bash #!/usr/bin/env bash snippet if @@ -79,11 +82,13 @@ snippet getopt shift $(($OPTIND-1)) snippet root if [ \$(id -u) -ne 0 ]; then exec sudo \$0; fi -snippet fun + +snippet fun-sh ${1:function_name}() { ${0:#function_body} } -snippet ffun + +snippet fun function ${1:function_name}() { ${0:#function_body} }