mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-22 08:31:26 +08:00
* s:system supports list type for command Objective is to reduce batchfiles on Windows. List type gives more flexibility on s:system() on how to pass the shell command to the builtin system(). If system() supports list type for command and there is no working directory, run it directly on system(). Targets Neovim only. Else, convert the list to an escaped command so that the user's shell can execute it. Neovim's system() does not support working directory system() so consider refactoring s:system to use a synchronous job. * Do not escape simple shell arguments Regexp taken from vim-fugitive s:shellesc(). * Set shellredir on Windows Prep to use list type for command passed to s:system() within s:spawn() * Internalize shellredir for s:spawn s:spawn needs to redirect stderr to stdout for jobs callbacks but s:system (for old Vim versions) sets shellredir if needed. * Leverage job api for cwd and stderr Vim/Neovim support stderr redirection and support error callbacks. Vim 8 and Neovim can set a job's working directory via 'cwd' key but it cannot be used as is on Vim because CI fails for the Vim release in Ubuntu Bionic and the latest Vim release.
77 KiB
77 KiB