Skip to content

Commit f6165ba

Browse files
committed
Merge pull request #277 from reyesyang/master
Add function snippet for shell
2 parents 8f11592 + dc824d2 commit f6165ba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

snippets/sh.snippets

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,11 @@ snippet getopt
8282
shift $(($OPTIND-1))
8383
snippet root
8484
if [ $(id -u) -ne 0 ]; then exec sudo $0; fi
85+
snippet fun
86+
${1:function_name}() {
87+
${0:#function_body}
88+
}
89+
snippet ffun
90+
function ${1:function_name}() {
91+
${0:#function_body}
92+
}

0 commit comments

Comments
 (0)