diff options
author | Enan Ajmain <3nan.ajmain@gmail.com> | 2023-03-20 03:25:12 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-19 14:25:12 -0700 |
commit | ecc4d0e435d618828b938d78fbded7fbe1314760 (patch) | |
tree | 777d1989517b013252a3c577f3e22246f1bf2746 /test/functional/vimscript/system_spec.lua | |
parent | 5726f33e8caaa5967c4ae93972a9eaec0b9c0c82 (diff) | |
download | rneovim-ecc4d0e435d618828b938d78fbded7fbe1314760.tar.gz rneovim-ecc4d0e435d618828b938d78fbded7fbe1314760.tar.bz2 rneovim-ecc4d0e435d618828b938d78fbded7fbe1314760.zip |
fix(shell): on Windows :make does not echo #22728
Problem:
On Windows, :make does not display the output of the program it runs.
The cause is the default 'shellpipe'. On Linux, nvim uses `tee` to redirect the
output to both stdout and the error file. In Windows, for both cmd.exe and
powershell, the output is only redirected to the error file.
Solution:
- On Windows, change the 'shellpipe' default to "2>&1| tee".
- Nvim includes `tee` in its Windows package.
- Document recommended defaults for powershell.
Fixes #12910
Diffstat (limited to 'test/functional/vimscript/system_spec.lua')
-rw-r--r-- | test/functional/vimscript/system_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/vimscript/system_spec.lua b/test/functional/vimscript/system_spec.lua index 7ada1c4bea..158dfe86d7 100644 --- a/test/functional/vimscript/system_spec.lua +++ b/test/functional/vimscript/system_spec.lua @@ -644,12 +644,12 @@ describe('shell :!', function() if is_os('win') then feed(':4verbose %!sort /R<cr>') screen:expect{ - any=[[Executing command: .?& { Get%-Content .* | & sort /R } 2>&1 | Out%-File %-Encoding UTF8 .*; exit $LastExitCode"]] + any=[[Executing command: .?& { Get%-Content .* | & sort /R } 2>&1 | %%{ "$_" } | Out%-File .*; exit $LastExitCode"]] } else feed(':4verbose %!sort -r<cr>') screen:expect{ - any=[[Executing command: .?& { Get%-Content .* | & sort %-r } 2>&1 | Out%-File %-Encoding UTF8 .*; exit $LastExitCode"]] + any=[[Executing command: .?& { Get%-Content .* | & sort %-r } 2>&1 | %%{ "$_" } | Out%-File .*; exit $LastExitCode"]] } end feed('<CR>') |