aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/ctx_functions_spec.lua
diff options
context:
space:
mode:
authorAnton Kriese <anton.kriese@gmx.de>2022-11-24 13:13:36 +0100
committerJustin M. Keyes <justinkz@gmail.com>2023-01-16 11:26:57 +0100
commit52268afb1cc47ca5ac91ca265e95827bff2901bd (patch)
treefe8c67feecba311124051c125abc903608931030 /test/functional/vimscript/ctx_functions_spec.lua
parent34b973b1d9e3b0c6f546e3aa661c29edd5a1ab87 (diff)
downloadrneovim-52268afb1cc47ca5ac91ca265e95827bff2901bd.tar.gz
rneovim-52268afb1cc47ca5ac91ca265e95827bff2901bd.tar.bz2
rneovim-52268afb1cc47ca5ac91ca265e95827bff2901bd.zip
fix(exepath)!: prefers extensionless for powershell
PROBLEM: exepath("test") should prefer ".bat" when shell=powershell. Current behavior differs from Vim 8.2.3071. TEST CASE: 1. in a folder which is in $PATH, create files "test" "test.bat". - "(Get-Command test).Path test" returns "test.bat". 2. compare nvim: nvim --clean :set shell=powershell :echo exepath("test") 3. should returns "path\to\test.bat" (before this patch it returns "path\to\test"). SOLUTION: After this patch, the binary files "text.exe", "test.bat", "test.com" will be found, but the file "test" (without any extension) will not be found (matches Vim 8.2.3071). But powershell's `where` and `Get-Command` _do_ find the extensionless 'test' file. But Nvim with ":set shell=cmd.exe", doesn't find "test" either (before and after this patch), even though `where test` returns correct path in cmd. - `where` is a program to find files in general, not just executable files. -`Get-Command` returning extensionless (and thus non-executable) file is puzzling even to Chris Dent, [PowerShell expert][1] (asked on Discord). [1]: https://www.amazon.com/Mastering-PowerShell-Scripting-Automate-environment-ebook/dp/B0971MG88X Co-authored-by: Enan Ajmain <3nan.ajmain@gmail.com> Helped-by: erw7 <erw7.github@gmail.com> Fixes #21045
Diffstat (limited to 'test/functional/vimscript/ctx_functions_spec.lua')
0 files changed, 0 insertions, 0 deletions