diff options
author | Mike Williams <mikew@globalgraphics.com> | 2021-06-28 20:53:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-28 20:53:58 +0200 |
commit | 127950241e84c822d3c50f46a00d42a70d2d5cb6 (patch) | |
tree | 6b5a0ac43a29edeb6e1cc3c3fb9f7c6f966cb28e /src/fileio.c | |
parent | ffec6dd16a766180429addaa78928c773a3c9832 (diff) | |
download | vim-git-127950241e84c822d3c50f46a00d42a70d2d5cb6.tar.gz |
patch 8.2.3071: shell options are not set properly for PowerShellv8.2.3071
Problem: Shell options are not set properly for PowerShell.
Solution: Use better option defaults. (Mike Willams, closes #8459)
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index 4bd773e0b..55012bfcb 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 = '/'; |