I have two shell commands which I want to run. However I only want to run the second one if the first one was successful.
For simplicity let the commands be
I can call then once at a time manually, no problem.
:terminal ls Home Documents ... :terminal ls Home Documents ...
But if I combine them, it breaks completely.
:terminal ls && ls ls: cannot access '&&': No such file or directory ls: cannot access 'ls': No such file or directory
From the buffer name it looks like it is calling
:!ls && ls as it should.
!ls && ls gives the desired result for me, and
:terminal ls && ls doesn't.
Can anybody explain this?