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.
This commit is contained in:
toogley 2016-03-21 17:06:09 +01:00
parent 65211115a0
commit 5590616c4a

View File

@ -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"