Yuri wrote: > On 03/21/2015 02:08, John Little wrote: >> Indeed, that's ksh syntax; with ash it accepts it but includes an extra $ >> character. The correct syntax with my ash is >> CR='\r' >> NL='\n' >> >> In this case flagging the $ as an error is useful, with my ash at least. > > In BSD Almquist shell, CR='\r' is literally backslash and r, and > CR=$'\r' is carriage return char. > This link suggests that this is the Bourne shell syntax: > http://44acres.com/braindisc/?q=node/105 (search for $’string’ there ) > The same syntax works in bash, but this isn't posix syntax. So why vim > flags it then, if it is Bourne shell syntax? >
The "Bourne" shell supported by the syntax/sh.vim is the old Bourne shell. Although the link you gave earlier says its for the Bourne shell, its just not the same one. Another solution mentioned was to have syntax/sh.vim in posix mode. However, I was looking through the following link: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html and don't see $'...' supported by posix. I saw in looking through your link that there was $"...", too. So, yes, its easy to get syntax/sh.vim's posix mode to support that extra syntax, but its not posix shell syntax, so I don't think it should be supported that way. Would setting let g:is_bash=1 do the trick for you? Regards, Chip Campbell -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.