Thursday, October 27, 2011

Re: Bug in the POSIX Shell Syntax Highlight Rules

Bastien Dejean wrote:
> Bastien Dejean a écrit :
>
>
>> if [ $? -eq 0 ]; then
>> makepkg -fi
>> fi
>>
> In fact, the shell itself makes the wrong assumption, so vim must be
> right.
>
>
Hmm, I tried

#! /bin/ksh
if [[ "$1" = "x" ]]; then
echo "GOT HERE#1"
fgrep stuff junk.sh
else
echo "GOT HERE#2"
fgrep -fi junk.sh
fi

(where the file "i" had one word, "stuff" , in it). It seemed that ksh
worked properly with both junk.sh and junk.sh x . I've modified
syntax/sh.vim to accomodate the -fi (and some other things); see
http://drchip.0sites.net/astronaut/vim/index.html#vimlinks_syntax .

So, are you sure that the shell is making the wrong assumption itself?
Kornshell and Posix are nearly identical.

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: