From 7c68c151242f839fafe554f87d9e4fa0834b11f3 Mon Sep 17 00:00:00 2001 From: Gert Date: Sun, 1 Mar 2015 18:05:34 +0100 Subject: [PATCH 1/2] repeared shebang changed shebang snippet, did not work (becous of the leading # in the snippet?) also changed the function snippet becous it was verry confusing, sh version could be placed back, but you realy had to know the source to find the bash snippet... --- snippets/sh.snippets | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/snippets/sh.snippets b/snippets/sh.snippets index 4c11258..f545f1f 100644 --- a/snippets/sh.snippets +++ b/snippets/sh.snippets @@ -1,6 +1,6 @@ # Shebang. Executing bash via /usr/bin/env makes scripts more portable. -snippet #! - #!/usr/bin/env bash +snippet bash + #!/usr/bin/bash snippet if if [[ ${1:condition} ]]; then @@ -80,11 +80,8 @@ 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} } From 2b8e591c19f5fac6c352c40338f19ad33f1f6692 Mon Sep 17 00:00:00 2001 From: Gert Date: Sun, 1 Mar 2015 23:21:07 +0100 Subject: [PATCH 2/2] . --- snippets/sh.snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/sh.snippets b/snippets/sh.snippets index f545f1f..3c9a9ea 100644 --- a/snippets/sh.snippets +++ b/snippets/sh.snippets @@ -1,6 +1,6 @@ # Shebang. Executing bash via /usr/bin/env makes scripts more portable. snippet bash - #!/usr/bin/bash + #!/bin/bash snippet if if [[ ${1:condition} ]]; then