From d5e0cc53ba65792bcdd77f0103ce4214e5031fa6 Mon Sep 17 00:00:00 2001 From: Nico Suhl Date: Thu, 22 May 2014 15:09:58 +0200 Subject: [PATCH] Add escaping of $ without escaping the snippet can not be expanded --- snippets/sh.snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/sh.snippets b/snippets/sh.snippets index 6bf7089..c9c6ebc 100644 --- a/snippets/sh.snippets +++ b/snippets/sh.snippets @@ -81,7 +81,7 @@ snippet getopt done shift $(($OPTIND-1)) snippet root - if [ $(id -u) -ne 0 ]; then exec sudo $0; fi + if [ \$(id -u) -ne 0 ]; then exec sudo \$0; fi snippet fun ${1:function_name}() { ${0:#function_body}