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...
This commit is contained in:
Gert 2015-03-01 18:05:34 +01:00
parent e1baa6d38e
commit 7c68c15124

View File

@ -1,6 +1,6 @@
# Shebang. Executing bash via /usr/bin/env makes scripts more portable. # Shebang. Executing bash via /usr/bin/env makes scripts more portable.
snippet #! snippet bash
#!/usr/bin/env bash #!/usr/bin/bash
snippet if snippet if
if [[ ${1:condition} ]]; then if [[ ${1:condition} ]]; then
@ -80,11 +80,8 @@ snippet getopt
shift $(($OPTIND-1)) shift $(($OPTIND-1))
snippet root snippet root
if [ \$(id -u) -ne 0 ]; then exec sudo \$0; fi if [ \$(id -u) -ne 0 ]; then exec sudo \$0; fi
snippet fun snippet fun
${1:function_name}() {
${0:#function_body}
}
snippet ffun
function ${1:function_name}() { function ${1:function_name}() {
${0:#function_body} ${0:#function_body}
} }