Thursday, February 3, 2011

Running a shell command, but only waiting for keypress if its exit status is non-zero?

Hi,

I'm running an external program `foo` from vim via `:!foo`. Whenever I
do, I see its stdout output scroll by, followed by a "Press ENTER or
type command to continue" prompt.

I'd like to not get that prompt unless the program's exit status is
non-zero. Otherwise, it should just signal success and let me keep
working. I don't care if the output gets dumped to the vim window,
although ideally there would be a way to disable that too.

Any ideas? Thanks, D

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