Skip to content

Commit 5470b2f

Browse files
committed
Merge pull request honza#368 from Nighoo/master
sh: Add escaping of $
2 parents d2455bb + d5e0cc5 commit 5470b2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: snippets/sh.snippets

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ snippet getopt
8181
done
8282
shift $(($OPTIND-1))
8383
snippet root
84-
if [ $(id -u) -ne 0 ]; then exec sudo $0; fi
84+
if [ \$(id -u) -ne 0 ]; then exec sudo \$0; fi
8585
snippet fun
8686
${1:function_name}() {
8787
${0:#function_body}

0 commit comments

Comments
 (0)