Hi, I've been using sh.vim for a few weeks. I don't edit that many bash files, so ... But I came across the following problem which didn't seem to be in the list of known bugs. In the following, the end of the "-r)" line to just before the "esac" is highlighted as errors. If there are not multiple commands on the same line (don't use ';' to separate commands) then everything is ok.

#!/bin/bash

while true
do
  case "$1" in
    -r) rev[nRev++]=$2; shift 2;;
    -c) change[nChange]=$2; shift 2;;
    -f) nofork=1; shift;;
    -h) usage;;
    --) shift; break;;
     *) echo Internal Error; exit 1;;
  esac
done

And thanks for the syntax file...
-ernie


On 5/25/2011 7:13 AM, Radek Nadstawny wrote:
Update, mostly bugfix

Bugs fixed:
* use of reserved word as a function name did not trigger an error
* [Bash] Arithmetic "for" variant was recognised only on top level.
   (thanks to sc for testing and spotting the bug)
* [Bash] "time" keyword couldn't be used as a separate command
* [Bash] when "function" keyword was used, optional parentheses after
   function name weren't recognised properly (also thanks to sc)
* [Bash] In parameter expansions of form "${var//pattern/replacement}"
   the slash at the beginning of pattern was misinterpreted as end of
   pattern

I'm not attaching the file directly, but you can reach it here:
http://dl.dropbox.com/u/30354453/sh.vim

Enjoy!

On side note, I'm working on ksh mode. I don't have ksh installed, but
I'm reading through ksh93 man page and it should give me all the
information I need.


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

Raspunde prin e-mail lui