From 127950241e84c822d3c50f46a00d42a70d2d5cb6 Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Mon, 28 Jun 2021 20:53:58 +0200 Subject: patch 8.2.3071: shell options are not set properly for PowerShell Problem: Shell options are not set properly for PowerShell. Solution: Use better option defaults. (Mike Willams, closes #8459) --- src/fileio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/fileio.c') diff --git a/src/fileio.c b/src/fileio.c index 4bd773e0bd..55012bfcbd 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5245,9 +5245,10 @@ vim_tempname( // Backslashes in a temp file name cause problems when filtering with // "sh". NOTE: This also checks 'shellcmdflag' to help those people who - // didn't set 'shellslash'. + // didn't set 'shellslash' but only if not using PowerShell. retval = utf16_to_enc(itmp, NULL); - if (*p_shcf == '-' || p_ssl) + if ((strstr((char *)gettail(p_sh), "powershell") == NULL + && *p_shcf == '-') || p_ssl) for (p = retval; *p; ++p) if (*p == '\\') *p = '/'; -- cgit v1.2.3