From 1aae46422242677c6cc23438537b70444436e5ce Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 3 Oct 2019 02:52:15 -0400 Subject: vim-patch:8.1.2115: MS-Windows: shell commands fail if &shell contains a space Problem: MS-Windows: shell commands fail if &shell contains a space. Solution: Use quotes instead of escaping. (closes vim/vim#4920) https://github.com/vim/vim/commit/2efc44b3f0b6bd8307cb281af095e08e15ab1c24 Always double-quote &shell if it contains a space. Neovim does not support escaping space with backslash, unlike Vim. N/A patches for version.c: vim-patch:8.0.1455: if $SHELL contains a space then 'shell' is incorrect Problem: If $SHELL contains a space then the default value of 'shell' is incorrect. (Matthew Horan) Solution: Escape spaces in $SHELL. (Christian Brabandt, closes vim/vim#459) https://github.com/vim/vim/commit/4bfa8af14142e54f509048239f4e8596911f56aa vim-patch:8.2.1194: test failure because shell prompt differs Problem: Test failure because shell prompt differs. Solution: Set the shell prompt. https://github.com/vim/vim/commit/a4dc6f92bb29b00783f8945bbe1101e837b6ad3c --- src/nvim/testdir/test_startup.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/nvim/testdir/test_startup.vim') diff --git a/src/nvim/testdir/test_startup.vim b/src/nvim/testdir/test_startup.vim index 7fe0168356..6214975ef5 100644 --- a/src/nvim/testdir/test_startup.vim +++ b/src/nvim/testdir/test_startup.vim @@ -581,6 +581,27 @@ func Test_read_stdin() call delete('Xtestout') endfunc +func Test_set_shell() + let after =<< trim [CODE] + call writefile([&shell], "Xtestout") + quit! + [CODE] + + if has('win32') + let $SHELL = 'C:\with space\cmd.exe' + let expected = '"C:\with space\cmd.exe"' + else + let $SHELL = '/bin/with space/sh' + let expected = '"/bin/with space/sh"' + endif + + if RunVimPiped([], after, '', '') + let lines = readfile('Xtestout') + call assert_equal(expected, lines[0]) + endif + call delete('Xtestout') +endfunc + func Test_progpath() " Tests normally run with "./vim" or "../vim", these must have been expanded " to a full path. -- cgit