I'm not sure it's even possible, but I'd like to force vim to quit if reading from stdin gave empty data (0 bytes).
The reason is when I'm running commands that may output something containing filesystem paths (e.g. grep(1) or find(1)) I redirect the output to
| view - so be able to quickly jump to a particular file with
gF. Now when the content is empty it make sense to not to start vim at all. How can I do that?
An alternative solution would be to put a mediator program that would connect its stdin and stdout when the content is non-empty, and that would exit otherwise, thus interrupting the pipeline.