patch 8.2.3079: Powershell core not supported by default
Problem: Powershell core not supported by default.
Solution: Set option defaults for "pwsh". (Mike Williams, closes #8481)
diff --git a/src/os_win32.c b/src/os_win32.c
index 1a005c9..eff2269 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -2135,6 +2135,7 @@
char_u *pathbuf = NULL;
char_u *pathext = NULL;
char_u *pathextbuf = NULL;
+ char_u *shname = NULL;
int noext = FALSE;
int retval = FALSE;
@@ -2142,8 +2143,10 @@
return FALSE;
// Using the name directly when a Unix-shell like 'shell'.
- if (strstr((char *)gettail(p_sh), "powershell") == NULL
- && strstr((char *)gettail(p_sh), "sh") != NULL)
+ shname = gettail(p_sh);
+ if (strstr((char *)shname, "sh") != NULL &&
+ !(strstr((char *)shname, "powershell") != NULL
+ || strstr((char *)shname, "pwsh") != NULL))
noext = TRUE;
if (use_pathext)