Friday, August 26, 2011

Re: Syntax errors in shell scripts

Bastien Dejean wrote:
> Javier Rojas a écrit :
>
>
>> On Thu, Aug 25, 2011 at 10:18:13AM +0200, Bastien Dejean wrote:
>>
>>> Any idea why, in the following expression:
>>>
>>> ${UZBL_URI#*://}
>>>
>>> the '#*://' part gets highlighted as shDerefWordError?
>>>
>> Because, by default, vim uses the sh syntax file.
>>
>> To use the bash syntax file by default, add the following line to your
>> .vimrc file:
>>
>> let g:is_bash=1
>>
> Thanks.
> I didn't realise it wasn't valid sh since my shebang line is #! /bin/sh.
>
Yeah -- unfortunately, /bin/sh has been made ambiguous, as Bourne sh,
ksh, ksh93, posix's ksh, and bash all use /bin/sh (with symbolic links
to whatever preferred binary).

Regards,
Chip Campbell

--
You received this message from the "vim_use" 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

No comments: