From 5590616c4a664ef10fbd00d1cd84dce7533323eb Mon Sep 17 00:00:00 2001 From: toogley Date: Mon, 21 Mar 2016 17:06:09 +0100 Subject: [PATCH] fix 'sbash' snippet interpreting newline and tab character This pullrequest: https://github.com/honza/vim-snippets/pull/704 introduced a new bug of the 'sbash' snippet of Ultisnips. Python interpreted the \n and \t in IFS=$'\n\t' and executed them instead of assigning it to the variable IFS. --- UltiSnips/sh.snippets | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UltiSnips/sh.snippets b/UltiSnips/sh.snippets index 33e5d00..7018184 100644 --- a/UltiSnips/sh.snippets +++ b/UltiSnips/sh.snippets @@ -34,7 +34,10 @@ snippet !env "#!/usr/bin/env (!env)" endsnippet snippet sbash "safe bash options" -`!p snip.rv = '#!/usr/bin/env bash' + "\nset -euo pipefail\nIFS=$'\n\t'" + "\n\n" ` +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +`!p snip.rv ='\n\n' ` endsnippet snippet temp "Tempfile"