Skip to content

Commit f1b72d8

Browse files
sharilslpil
authored andcommitted
Fix syntax error: unexpected end of file
By placing the closing TOKEN at the begin of line, this fixes `syntax error: unexpected end of file`. `echo \\n` creates a mere newline without indentation of the current line unlike a new line in a snippet. See https://github.com/koalaman/shellcheck/wiki/SC1039
1 parent e77399e commit f1b72d8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

UltiSnips/sh.snippets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ endsnippet
7070

7171
snippet here "here document (here)"
7272
<<-${2:'${1:TOKEN}'}
73-
$0
74-
${1/['"`](.+)['"`]/$1/}
73+
$0`echo \\n`${1/['"`](.+)['"`]/$1/}
7574
endsnippet
7675

7776
snippet /ift(est)?/ "if ... then (if)" rb

0 commit comments

Comments
 (0)