Am Freitag 09 Februar 2007 schrieb Charles E Campbell Jr:
> Martin Krischik wrote:
> >Hello,
> >
> >I often use little vim scripts using "vim -E". Now like all executable
> >vim will return a result code after execution.
> >
> >And it is often "false" which I don't want. Does anybody know how to
> >influence the return value from "vim -E"?
> >
> :q  :wq  :q!   -- these are normal quits (:wq also writes)
> :
> :cq  -- quits, but Vim will return an error code
>

Thats exactly as far as I came without help. Now, what I was looking for 
was "quit without error code" - or better, since there is allways an error 
code, "quit with error code 'success'".

Currently Vim is seems to me that randomly chooses an error code to return - 
which is not good for bash scripts running in "set -o errexit" mode.

BTW: Any bash script author should at least consider to use "set -o errexit" 
it is a really usefull debugging tool.

Martin

-- 
Martin Krischik
mailto://[EMAIL PROTECTED]

Attachment: pgp0J7wrGfHOJ.pgp
Description: PGP signature

Reply via email to