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} }