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:
parent
65211115a0
commit
5590616c4a
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user