On 2020-04-26, Bram Moolenaar wrote:
>
> > > Works fine for me. What is the command that actually gets executed?
> > > It should be something like ":!exit 1 |& tee /tmp/vt42YzR/6"
> >
> > It is indeed.
> >
> > > Perhaps your "tee" command does not pass on the exit value
> >
> > I'm not sure what's meant by this? So far as I'm aware the only way to
> > do this is with something like bash's `set -o pipefail`. I've tried
> > doing using this and I `v:shell_error` is still 0 for me.
>
> Ah, my 'shell' was set to /bin/tcsh. Then it works. With bash it
> doesn't work. I don't think we can fix this in Vim, we just don't get
> the exit value.
I had this problem a while back and solved it with this setting:
:let &shellpipe .= " %s; exit ${PIPESTATUS[0]}"
I just tested it again and it seems to work with Vim 8.2.587 and
Bash 4.3.48(1) on Ubuntu 16.04.
HTH,
Gary
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20200426172145.GB28061%40phoenix.