- Vim 8 on Windows 10 (from chocolatey)
- Vim 7 on Bash on Ubuntu on Windows 10
echo system('(echo foo) && (echo bar)')
Windows prints only bar
(last command result)
Linux prints foo
and bar
To solve this incompatibility, surround entire commands
echo system('((echo foo) && (echo bar))')
Then, both Windows and Linux returns foo
and bar
.
echomsg systemlist('((echo foo) & (echo bar))')
systemlist()
cannot remove carridge return.
Windows returns ['foo\r', 'bar\r']
Linux returns ['foo', 'bar']
Should be
split(system('...'), '\v\r?\n')